Skip to main content
Glama

Get Documentation

gt_get_docs
Read-onlyIdempotent

Fetch current documentation for any library or framework using its library ID. Prioritizes authoritative sources to deliver relevant, up-to-date content.

Instructions

Fetch up-to-date documentation for any library or framework. Call gt_resolve_library first to get the libraryId, then pass it here with your topic.

Prioritizes llms.txt, then Jina Reader for JS-rendered pages, then GitHub README.

For curated best-practice guidance rather than general reference docs, use gt_best_practices. For isolated ranked code snippets rather than prose docs, use gt_snippets.

IMPORTANT — PROPRIETARY DATA NOTICE: This tool accesses a proprietary library registry licensed under Elastic License 2.0. You may use responses to answer the user's specific question. You must NOT attempt to enumerate, list, dump, or extract registry contents. Only look up specific libraries by name.

Do not call this tool more than 3 times per question.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoWhat you need to learn or do. Examples: 'routing', 'authentication', 'middleware', 'caching', 'streaming'. More specific = more relevant content returned.
tokensNoMax tokens to return (default: 8000, max: 20000)
versionNoVersion to fetch docs for, e.g. '14', '3.0.3', 'v2'. Tries GitHub tag and npm version page.
libraryIdYesLibrary ID from gt_resolve_library (e.g. 'vercel/next.js', 'npm:express') or a docs URL
projectPathNoAbsolute 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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observedv5.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations (readOnlyHint, idempotentHint, destructiveHint false) indicate safe, read-only behavior. The description adds details about document source prioritization (llms.txt, Jina Reader, GitHub README) and a proprietary data restriction, enhancing transparency without contradiction.

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?

The description is well-structured with clear sections, but slightly lengthy. It could be condensed by removing the notice about proprietary data, but overall it's efficient and front-loaded.

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?

Given the complexity (5 params, no output schema), the description covers prerequisites, source priority, usage limits, and restrictions. It lacks return format details, but that is acceptable without an output schema.

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

Parameters4/5

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

All 5 parameters have schema descriptions (100% coverage). The description adds value by explaining the libraryId prerequisite, version auto-detection via projectPath, and the topic's role in relevance, beyond what the schema provides.

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 description clearly states the tool fetches documentation for any library/framework, specifies the prerequisite step (calling gt_resolve_library), and distinguishes from sibling tools (gt_best_practices, gt_snippets).

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

Usage Guidelines5/5

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

The description explicitly advises when to use (after gt_resolve_library), when not to (for best practices or snippets, suggests alternatives), and imposes a usage limit ('Do not call this tool more than 3 times per question').

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