Skip to main content
Glama

AI Developer Toolkit documentation

Fetch a documentation article

fetch
Read-only

Retrieve the complete markdown of one documentation article by the id returned from search (for example en/claude-code/advanced-techniques/hooks-automation). The text is returned in full; metadata.gated only reports whether the article sits behind the paywall on the web. An unknown id is an error — call search first.

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": {
      "id": "<id>"
    },
    "name": "fetch"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesArticle id from a `search` result.

Output Schema

NameRequiredDescriptionDefault
idYes
urlYes
textYes
titleYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / llm_model
      Removed value: -{
      -  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "id",
      -  "llm_model"
      -]New value: +[
      +  "id"
      +]
  2. Changed2 schema fields changed
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "id"
      -]New value: +[
      +  "id",
      +  "llm_model"
      +]
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description adds meaningful behavioral context beyond the readOnlyHint and openWorldHint annotations: it discloses that the full text is returned, clarifies that `metadata.gated` only indicates paywall status (not access to the content), and explicitly warns that an unknown id produces an error. These details help the agent predict behavior and act accordingly.

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

Conciseness5/5

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

The description is compact and every sentence earns its place: purpose, retrieval source, example, return-behavior note, and error guidance are all packed into three sentences. It is front-loaded with the core action and resource, making it immediately scannable.

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

Completeness5/5

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

Given the single required parameter, the presence of an output schema, and the read-only annotation, the description covers all essential aspects: what the tool returns, how to obtain a valid input, what error to expect, and the meaning of a potentially confusing field. Nothing critical is missing for an agent to invoke this tool correctly.

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?

The schema already fully describes `id` as 'Article id from a `search` result', so the parameter is well documented. The description reinforces this by restating the source of the id and adding a concrete example, which helps an agent form a correct mental model without adding substantial new semantics.

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 states a specific action ('Retrieve the complete markdown of one documentation article') and clearly identifies the resource and key by which it is retrieved (the id returned from `search`). It also gives a concrete example id, making the purpose unambiguous and distinguishing it from its sibling `search`, which finds articles rather than fetching one.

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 instructs the agent to call `search` first, states that the id comes from `search`, and warns that an unknown id is an error. This effectively tells the agent when to use this tool and when to use the sibling `search` instead, leaving no ambiguity about the correct sequencing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.