queryDocs
Fetches documentation, API references, and syntax sections for packages, APIs, or tools across multiple sources, so you can find the right usage details without manual searching.
Instructions
Fetch docs, API references & syntax-extracted sections for packages/APIs/tools. Multi-source: 'auto' (smart fallback), 'official', 'docs.rs', 'pkg.go.dev', 'devdocs' (800+ tools/langs), 'mdn' (Web standards), 'javadoc', 'context7', 'npm', 'pypi'.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "queryDocs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cache | No | Use the 24h local docs cache (default 'default') or bypass/refresh it with 'reload' | |
| limit | No | Maximum number of code snippets or sections to return (default 5) | |
| query | No | The specific topic, method, command, or question to get relevant documentation for (e.g. 'hset', 'useMemo', 'middleware', 'asyncio'). For long documents (>8000 chars), syntax-level section extraction is performed, keeping the preamble (imports/setup) and targeted section intact. | |
| source | No | Documentation source: 'auto' (smart routing & cascade fallback: Context7 -> Official Site -> DevDocs -> Registry), 'official' (standalone doc site), 'docs.rs' (Rust crates), 'pkg.go.dev' (Go packages), 'devdocs' (800+ middleware & languages: Redis, Docker, Nginx, Python, C++, etc.), 'mdn' (MDN Web Docs: JS, Web APIs, CSS), 'rfc' (IETF/RFC standards: HTTP, TLS, QUIC, JSON, etc.), 'javadoc' (Javadoc.io for Maven packages), 'context7' (Context7 LLM doc index), 'npm', 'pypi', 'github' (registry fallback) | auto |
| strict | No | If true, rejects low-confidence matches with an error instead of returning loosely matched candidate docs or alternative libraries (default false) | |
| library | No | Library, package, middleware, or Web API name (e.g. 'react', 'fastapi', 'tokio', 'redis', 'docker', 'fetch', 'Array.prototype.map', 'org.apache.commons:commons-lang3'). Also supports ecosystem prefixes like 'crates:tokio', 'go:gin', 'mdn:fetch', 'devdocs:redis', 'javadoc:com.google.guava:guava' or Context7 library ID (e.g. '/vercel/next.js') | |
| version | No | Optional explicit version for consistent multi-source pinning (e.g. '18.2.0', '3.11', '1.38.0', 'v1.9.1'). Overrides an @version embedded in library | |
| libraryId | No | Legacy alias for library (e.g. '/vercel/next.js') |