Skip to main content
Glama

Documento para Deep Research

fetch
Read-onlyIdempotent

Retrieve a full IBGE document using an id returned by search, including Markdown text and canonical URL for citation.

Instructions

Returns the full document for an id obtained from search, as { id, title, text, url, metadata }: text is the readable content (Markdown) and url the canonical public page to cite.

Companion of search in the OpenAI Deep Research contract, over the IBGE (Brazilian official statistics: SIDRA tables, municipalities, known indicators) catalog. Only ids returned by search are valid; an unknown id returns an error. The ibge_* tools (ibge_sidra, ibge_cidades, ibge_indicadores, ibge_comparar…) remain the tools for data queries.

Behavior: read-only and idempotent — a live GET against the public source when the document needs it.

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
idYesIdentificador de um documento devolvido por `search`

Output Schema

NameRequiredDescriptionDefault
idYesIdentificador único do documento no servidor; é o que `fetch` recebe
urlYesURL pública canônica do documento — a citação do ChatGPT depende dela
textYesConteúdo integral do documento, legível (Markdown)
titleYesTítulo legível do documento
metadataNoPares chave/valor adicionais sobre o documento (tipo, fonte, período…)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.2
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observedv0.6.0

TDQS

A4.4/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 safety bar is met structurally. The description adds non-obvious context beyond them: failure behavior on unknown ids, that it performs a live GET against the public source when needed, and the shape of the payload. It stops short of describing rate limits or latency characteristics.

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?

Front-loaded with the return contract, then provenance, then routing to the `ibge_*` siblings. Each sentence carries information, though the inline field enumeration partially duplicates the output schema and could be tighter.

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?

For a single-parameter retrieval tool with a full output schema and complete annotations, everything an agent needs to call it correctly is present: provenance constraint, error condition, read semantics, and where to go instead for data queries. Return-value explanation is a bonus rather than a necessity.

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?

Only one parameter, and the schema description already states it is an identifier returned by `search` at 100% coverage. The description reinforces the provenance rule (invalid ids error out) but adds no syntax, format, or example beyond the schema — baseline 3 is appropriate.

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?

Opens with a specific verb+resource ('Returns the full document for an id'), names the field set returned, and explicitly positions itself as the companion of `search` in the Deep Research contract. An agent can distinguish it from the ~20 `ibge_*` data-query 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 Guidelines5/5

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

Explicit preconditions: only ids returned by `search` are valid, and an unknown id returns an error. It also names the alternative path for a different intent ('The `ibge_*` tools ... remain the tools for data queries'), which is exactly the when-not guidance an agent needs.

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