UNPKG

@noanswer/context-compose

Version:

Orchestrate complex AI interactions with Context Compose. A powerful CLI and server for building, validating, and managing context for large language models using the Model Context Protocol (MCP).

52 lines (44 loc) 2.1 kB
version: 1 kind: mcp name: context7 description: Research library documentation and implementation guidance through Context7 prompt: | Leverage Context7 to conduct in-depth research on software libraries. Resolve library IDs, fetch comprehensive documentation, and extract key information for implementation. This process ensures you use accurate, up-to-date, and secure code from trusted sources. enhanced-prompt: | # 📚 Context7 Library Research ## 1. Core Workflow The primary workflow consists of two main steps: resolving a library name to a unique ID and then fetching its documentation. **A. Resolve Library ID** First, find the canonical ID for the library you're interested in. ```bash # Example: Find the ID for "React" context7 resolve-library-id --library "react" # Expected Output: /facebook/react ``` **B. Retrieve Documentation** Use the library ID to fetch detailed documentation on a specific topic. ```bash # Example: Get docs for React Hooks context7 get-library-docs \ --library-id "/facebook/react" \ --topic "hooks" \ --tokens 10000 ``` ## 2. Research Best Practices - **Start Broad, Then Narrow:** Begin with general topics, then dive into specific APIs. - **Focus on Stable Versions:** Prioritize docs for the latest stable release. - **Validate with Examples:** Test code snippets to confirm their functionality. ## 3. Key Information to Extract - **Installation:** `npm install`, `yarn add`, or other setup commands. - **Core API:** Key functions, classes, and components. - **Usage Patterns:** Recommended ways to use the library. - **Best Practices:** Performance, security, and maintenance advice. - **Version Compatibility:** Breaking changes and migration guides. ## 4. Quality Checks - **Official Sources:** Ensure documentation is from official or trusted sources. - **Recency:** Check the publication or update date. - **Cross-Reference:** Compare with other reliable sources. **🎯 Result:** Accurate, up-to-date library documentation with actionable implementation guidance.