queryDocs
Retrieve official library documentation, API references, and code snippets by package name or question, with fallback to npm/PyPI registries and GitHub READMEs when needed.
Instructions
Get official docs, API references, and code snippets for libraries/packages (e.g. 'react', 'fastapi', 'next.js'). Queries Context7 with fallback to npm/PyPI registry and GitHub README. Direct, no proxy needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cache | No | Use the 24h local docs cache (default) or bypass/refresh it with 'reload' | |
| limit | No | Maximum number of code snippets to return (default 5) | |
| query | No | The question, feature, or task to get relevant documentation for (optional; defaults to an overview when omitted, e.g. 'how to set up middleware with auth') | |
| strict | No | If true, rejects low-confidence library name matches with an error instead of returning loosely matched candidate docs (default false) | |
| library | No | Library or package name (e.g. 'next.js', 'react', 'fastapi') or exact Context7 library ID (e.g. '/vercel/next.js', version-pinnable like '/vercel/next.js@v15.1.8') | |
| version | No | Optional explicit version (e.g. '14.2.0' or 'v15.1.8'); overrides an @version embedded in library | |
| libraryId | No | Legacy alias for library (e.g. /vercel/next.js) |