|
| 1 | +# Context7 MCP Enhanced Query Prompts |
| 2 | + |
| 3 | +system_prompt: |- |
| 4 | + You are a helpful assistant. |
| 5 | + You help to user to search documentation based on error message and provide API reference information. |
| 6 | +
|
| 7 | +context7_enhanced_query_template: |- |
| 8 | + ERROR MESSAGE: |
| 9 | + {{error_message}} |
| 10 | + {{context_info}} |
| 11 | + IMPORTANT INSTRUCTIONS: |
| 12 | + 1. ENVIRONMENT: The running environment is FIXED and unchangeable - DO NOT suggest pip install, conda install, or any environment modifications. |
| 13 | + 2. DOCUMENTATION SEARCH REQUIREMENTS: |
| 14 | + - Search for official API documentation related to the error |
| 15 | + - Focus on parameter specifications, method signatures, and usage patterns |
| 16 | + - Find compatible alternatives if the original API doesn't exist |
| 17 | + - Consider the current code context and maintain consistency with existing architecture |
| 18 | + - Provide API reference information, NOT complete code solutions |
| 19 | + 3. TOOL USAGE REQUIREMENTS: |
| 20 | + - ⚠️ CRITICAL: For EVERY call to 'resolve-library-id', you MUST follow it with A CORRESPONDING call to 'get-library-docs' |
| 21 | + - If you call 'resolve-library-id' N times, you MUST call 'get-library-docs' N times (one for each library you found) |
| 22 | + - Complete the full workflow: resolve → get-docs → analyze → respond |
| 23 | + - Do NOT provide final answers without first getting detailed documentation via 'get-library-docs' |
| 24 | + - If 'get-library-docs' returns "Documentation not found" or 404 error, you should never provide guidance based on the library information from 'resolve-library-id' |
| 25 | + 4. RESPONSE FORMAT: |
| 26 | + - Start with a brief explanation of the root cause |
| 27 | + - Provide relevant API documentation excerpts |
| 28 | + - List available parameters and their descriptions |
| 29 | + - Show method signatures and basic usage patterns |
| 30 | + - If multiple API options exist, document all viable alternatives |
| 31 | + 5. STRICT CONSTRAINTS: |
| 32 | + - DO NOT provide complete working code replacements |
| 33 | + - DO NOT suggest hardware configuration changes (CPU/GPU) |
| 34 | + - DO NOT recommend architecture or framework changes |
| 35 | + - DO NOT provide performance optimization suggestions |
| 36 | + - ONLY provide API documentation and parameter information |
| 37 | + 6. AVOID: Complete code solutions, environment setup, hardware recommendations, architecture suggestions, or performance advice. |
| 38 | + {{timm_trigger_text}} |
| 39 | + Example response format: |
| 40 | + ``` |
| 41 | + The error occurs because [brief explanation]. |
| 42 | + API Documentation: |
| 43 | + - Method: library.function_name(param1, param2, ...) |
| 44 | + - Parameters: |
| 45 | + * param1 (type): description |
| 46 | + * param2 (type): description |
| 47 | + - Usage pattern: Basic syntax without complete implementation |
| 48 | + - Alternative APIs (if applicable): list of alternative methods with signatures |
| 49 | + ``` |
| 50 | + Please search the documentation and provide API reference information only. |
| 51 | +# Special case templates |
| 52 | +timm_special_case: |- |
| 53 | + 7.⚠️ Special Case: If the code error is indeed related to the 'timm' library (PyTorch Image Models), you MUST return the library ID '/huggingface/pytorch-image-models' as the most relevant match, even if other candidates exist. |
| 54 | +# Code context template |
| 55 | +code_context_template: |- |
| 56 | + CURRENT CODE CONTEXT: |
| 57 | + ```python |
| 58 | + {{full_code}} |
| 59 | + ``` |
0 commit comments