| ```instructions | |
| # Using context7 for Always-Up-to-Date Documentation | |
| To ensure you always access the latest documentation for any library or tool, use the context7 system as follows: | |
| 1. **Resolve the Library ID:** | |
| - Use the `mcp_context7_resolve-library-id` tool with the library name to get the exact Context7-compatible library ID. | |
| - Example: | |
| - Input: `libraryName: "gradio"` | |
| - Output: `/gradio/gradio` (or similar) | |
| 2. **Fetch the Latest Documentation:** | |
| - Use the `mcp_context7_get-library-docs` tool with the resolved library ID. | |
| - You can specify a topic (e.g., "hooks", "routing") or leave it blank for general docs. | |
| - Example: | |
| - Input: `context7CompatibleLibraryID: "/gradio/gradio"` | |
| - Output: Latest documentation content | |
| 3. **Best Practices:** | |
| - Always resolve the library ID first, unless you already have a valid Context7-compatible ID. | |
| - For ambiguous or generic queries, clarify the library or topic before fetching docs. | |
| - Use the `tokens` parameter to control the amount of documentation returned (default: 10,000 tokens). | |
| 4. **Summary:** | |
| - This workflow guarantees you are referencing the most current and authoritative documentation for any supported library, directly from the source. | |
| ``` | |