queryDocs
Get version-specific official documentation and code snippets for any library ID. Pin a library version to fetch targeted answers and examples for coding questions.
Instructions
Get up-to-date, version-specific official docs and code snippets for a Context7 library ID (e.g. /vercel/next.js, version-pinnable like /vercel/next.js@v15.1.8). Use with resolveLibraryId for official documentation lookups — direct, reliable, no proxy needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of code snippets to return (default 5) | |
| query | No | The question or task to get relevant documentation for (optional; defaults to an overview when omitted, e.g. 'how to set up middleware with auth') | |
| libraryId | Yes | Exact Context7-compatible library ID (e.g. /vercel/next.js, /packages/express; optional version like /vercel/next.js@v15.1.8) |