Skip to main content
Glama

Fetch a document by id

fetch
Read-onlyIdempotent

Fetch a search result by id, e.g. 'cso:F1001' or 'legislation:2018/7/s2'. Official service links return handoff guidance, not publisher content.

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
idYesId from search, '<source>:<key>'.
max_tokensNoResult budget in tokens (default 2000).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / additionalProperties
      Previous value: -{}New value: +true
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuine behavioral context beyond that: for official service links the response is handoff guidance rather than publisher content, which prevents the agent from misreading a non-content result as a failure. It does not discuss rate limits, error modes, or truncation of large documents.

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?

Two tight sentences: the action and id format come first, and the edge-case behavior follows. No filler, no restatement of the title, and every clause carries information the agent needs.

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 an output schema present, return-shape documentation is unnecessary, and the annotations carry the safety semantics. The description covers what remains an agent's likely blind spot (handoff-style results); only minor gaps such as truncation behavior or failure handling are absent, which is acceptable for a simple two-parameter read tool.

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?

Schema coverage is 100%, so the baseline would be 3, but the description contributes real meaning by giving two literal id examples that illustrate the '<source>:<key>' pattern from the schema. The max_tokens budget parameter is left entirely to the schema, which documents it adequately.

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 and resource ('Fetch a search result by id') and grounds it with two concrete id examples ('cso:F1001', 'legislation:2018/7/s2'), so the agent knows exactly what input shape to supply. It implicitly distinguishes itself from the search sibling by being the id-based retrieval step, but never names that sibling explicitly.

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?

The phrase 'a search result' plus the schema note 'Id from search' makes the intended workflow clear: search first, then fetch by the returned id. The added caveat about official service links returning handoff guidance is a useful usage expectation, but there are no explicit exclusions or named alternatives for cases where the agent has no id.

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.