Skip to main content
Glama

queryDocs

Read-onlyIdempotent

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

NameRequiredDescriptionDefault
cacheNoUse the 24h local docs cache (default 'default') or bypass/refresh it with 'reload'
limitNoMaximum number of code snippets or sections to return (default 5)
queryNoThe 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.
sourceNoDocumentation 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
strictNoIf true, rejects low-confidence matches with an error instead of returning loosely matched candidate docs or alternative libraries (default false)
libraryNoLibrary, 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')
versionNoOptional 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
libraryIdNoLegacy alias for library (e.g. '/vercel/next.js')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.6.1
    • changedInput schema / properties / source / description
      Previous value: -"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), 'javadoc' (Javadoc.io for Maven packages), 'context7' (Context7 LLM doc index), 'npm', 'pypi', 'github' (registry fallback)"New value: +"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)"
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "auto",
      -  "context7",
      -  "official",
      -  "docs.rs",
      -  "pkg.go.dev",
      -  "devdocs",
      -  "mdn",
      -  "javadoc",
      -  "npm",
      -  "pypi",
      -  "github"
      -]New value: +[
      +  "auto",
      +  "context7",
      +  "official",
      +  "docs.rs",
      +  "pkg.go.dev",
      +  "devdocs",
      +  "mdn",
      +  "rfc",
      +  "javadoc",
      +  "npm",
      +  "pypi",
      +  "github"
      +]
  2. Changed8 schema fields changedv1.6.0
    • changedInput schema / properties / cache / description
      Previous value: -"Use the 24h local docs cache (default) or bypass/refresh it with 'reload'"New value: +"Use the 24h local docs cache (default 'default') or bypass/refresh it with 'reload'"
    • changedInput schema / properties / library / description
      Previous value: -"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')"New value: +"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')"
    • changedInput schema / properties / libraryId / description
      Previous value: -"Legacy alias for library (e.g. /vercel/next.js)"New value: +"Legacy alias for library (e.g. '/vercel/next.js')"
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of code snippets to return (default 5)"New value: +"Maximum number of code snippets or sections to return (default 5)"
    • changedInput schema / properties / query / description
      Previous value: -"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')"New value: +"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."
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "auto",
      +  "description": "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), 'javadoc' (Javadoc.io for Maven packages), 'context7' (Context7 LLM doc index), 'npm', 'pypi', 'github' (registry fallback)",
      +  "enum": [
      +    "auto",
      +    "context7",
      +    "official",
      +    "docs.rs",
      +    "pkg.go.dev",
      +    "devdocs",
      +    "mdn",
      +    "javadoc",
      +    "npm",
      +    "pypi",
      +    "github"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / strict / description
      Previous value: -"If true, rejects low-confidence library name matches with an error instead of returning loosely matched candidate docs (default false)"New value: +"If true, rejects low-confidence matches with an error instead of returning loosely matched candidate docs or alternative libraries (default false)"
    • changedInput schema / properties / version / description
      Previous value: -"Optional explicit version (e.g. '14.2.0' or 'v15.1.8'); overrides an @version embedded in library"New value: +"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"
  3. Changed1 schema field changedv1.5.1
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +{}
  4. Changed4 schema fields changedv1.3.10
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • addedInput schema / properties / cache
      Added value: +{
      +  "description": "Use the 24h local docs cache (default) or bypass/refresh it with 'reload'",
      +  "enum": [
      +    "default",
      +    "reload"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / strict
      Added value: +{
      +  "description": "If true, rejects low-confidence library name matches with an error instead of returning loosely matched candidate docs (default false)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Optional explicit version (e.g. '14.2.0' or 'v15.1.8'); overrides an @version embedded in library",
      +  "minLength": 1,
      +  "type": "string"
      +}
  5. Changed1 schema field changedv1.3.1
    • removedInput schema / required
      Removed value: -[
      -  "library"
      -]
  6. Changed4 schema fields changedv1.2.1
    • addedInput schema / properties / library
      Added value: +{
      +  "description": "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')",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / libraryId / description
      Previous value: -"Exact Context7-compatible library ID (e.g. /vercel/next.js, /packages/express; optional version like /vercel/next.js@v15.1.8)"New value: +"Legacy alias for library (e.g. /vercel/next.js)"
    • changedInput schema / properties / query / description
      Previous value: -"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')"New value: +"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')"
    • changedInput schema / required
      Previous value: -[
      -  "libraryId"
      -]New value: +[
      +  "library"
      +]
  7. First observedv1.0.11

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/openWorld/non-destructive, so the bar is lower, and the description still adds real behavior: the 'auto' cascade (Context7 -> Official -> DevDocs -> Registry), a 24h cache, strict mode erroring on low-confidence matches instead of returning fuzzy candidates, and syntax-level section extraction for documents over 8000 chars. That is meaningful disclosure of fallback and failure semantics not visible in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the verb and object, then a compact source list. The parenthetical source enumeration is dense but earns its place as a routing hint. Slight redundancy with the schema's source enum keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 8 fully documented parameters, no output schema, and safety already covered by annotations, the description covers the remaining gaps: what is returned (references and extracted sections), the auto-resolution chain, caching, and strict failure mode. Only the omission of result ordering/pagination detail and sibling routing leaves anything open.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains every parameter, including source routing, version pinning, and the libraryId legacy alias. The description mostly repeats the source taxonomy the schema already lists and adds no syntax or format detail beyond it. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: fetch documentation, API references, and syntax-extracted sections for packages/APIs/tools. It enumerates the coverage domain (8 source ecosystems), so an agent knows it retrieves docs rather than web pages or GitHub files. It does not name the siblings (fetchWebContent, fetchGithubContent, search) to draw the boundary, which is the only gap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through the source enum: 'auto' is described as smart routing with cascade fallback, and 'strict' is framed as a confidence gate, which hints at when to pick each. But there is no explicit statement of when to use this over fetchWebContent or search, and no guidance on when to prefer a pinned source over 'auto'. Implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools