Skip to main content
Glama

Get Documentation

gt_get_docs
Read-onlyIdempotent

Fetches live reference documentation for a specified library and topic, using a library name, package ID, or docs URL to ground answers and reduce hallucinations.

Instructions

Reference docs for one library, filtered to a topic. libraryId: a plain name ('nextjs'), GroundTruth ID, npm:/pypi: package, or a docs URL. Curated guidance: gt_best_practices. Code-only snippets: gt_snippets.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "libraryId": "<libraryId>"
    },
    "name": "gt_get_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
topicNoSpecific subject, e.g. 'middleware'
tokensNo
versionNoe.g. '15'
libraryIdYesPlain name ('nextjs'), GroundTruth ID, npm:/pypi: package, or docs URL
projectPathNoProject root, to read the installed version

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv8.1.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / libraryId / description
      Previous value: -"Library ID from gt_resolve_library (e.g. 'vercel/next.js', 'npm:express') or a docs URL"New value: +"Plain name ('nextjs'), GroundTruth ID, npm:/pypi: package, or docs URL"
    • changedInput schema / properties / projectPath / description
      Previous value: -"Absolute project path. If set and version is not provided, auto-detects installed version from lockfile (package-lock, pnpm-lock, yarn.lock, Cargo.lock, poetry.lock, uv.lock)."New value: +"Project root, to read the installed version"
    • removedInput schema / properties / tokens / description
      Removed value: -"Max tokens to return (default: 8000, max: 20000)"
    • changedInput schema / properties / topic / description
      Previous value: -"What you need to learn or do. Examples: 'routing', 'authentication', 'middleware', 'caching', 'streaming'. More specific = more relevant content returned."New value: +"Specific subject, e.g. 'middleware'"
    • changedInput schema / properties / version / description
      Previous value: -"Version to fetch docs for, e.g. '14', '3.0.3', 'v2'. Tries GitHub tag and npm version page."New value: +"e.g. '15'"
  2. Changed1 schema field changedv7.0.1
    • addedInput schema / properties / projectPath
      Added value: +{
      +  "description": "Absolute project path. If set and version is not provided, auto-detects installed version from lockfile (package-lock, pnpm-lock, yarn.lock, Cargo.lock, poetry.lock, uv.lock).",
      +  "maxLength": 500,
      +  "type": "string"
      +}
  3. First observedv5.2.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered and the description carries a lighter burden. It adds the accepted libraryId identifier forms and the topic-filtering behavior, but says nothing about output shape, pagination, or how the token budget governs what comes back.

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?

Three short, front-loaded statements with no filler, and the resource definition leads before the sibling pointers. The trailing fragments are telegraphic enough that they read as notes rather than sentences, a minor clarity cost in an otherwise tight definition.

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

Completeness3/5

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

With five parameters, no output schema, and annotations covering safety, the description is close but leaves the tokens parameter entirely unexplained in both schema and description, even though it controls how much documentation is returned. The version and projectPath params are handled by the schema, so the remaining gap is narrow but real.

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 80%, so the baseline is 3. The description's libraryId wording ('plain name, GroundTruth ID, npm:/pypi: package, or docs URL') is essentially verbatim what the schema already says, and it adds no meaning for topic, version, or projectPath.

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

Purpose5/5

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

The first sentence states a specific resource (reference docs), a scope (one library), and a filter (topic). The closing fragments name gt_best_practices and gt_snippets and pin each to a distinct content type, so an agent can separate this retrieval tool from its nearest siblings without opening any schema.

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

Usage Guidelines4/5

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

It explicitly routes the agent away to gt_best_practices for curated guidance and gt_snippets for code-only snippets, which is real when-to-use guidance. It stops short of stating when this tool is the wrong choice versus the broader search/resolve siblings, so it is clear context rather than a full decision rule.

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