Skip to main content
Glama

Deep Research Document

fetch
Read-onlyIdempotent

Retrieve the full document for an ID from search, including title, text, URL, and metadata 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 medical terminologies (CID-10 categories and chapters, ICD-11, LOINC, RxNorm, MeSH, terminology version records) catalog. Only ids returned by search are valid; an unknown id returns an error. The terminology tools (icd11_*, cid10_*, loinc_*, rxnorm_*, mesh_*, atc_*, map_*, find_equivalent, validate_codes) remain the tools for data queries.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesIdentifier of a document returned by `search`

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier of the document on this server; what `fetch` takes
urlYesCanonical public URL of the document — ChatGPT's citation depends on it
textYesFull readable content of the document (Markdown)
titleYesHuman-readable title of the document
metadataNoAdditional key/value pairs about the document (kind, source, period…)
provenanceYesProvenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license
attributionYesCanonical source URLs of this response (attribution list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.1
    • addedOutput schema / properties / provenance / properties / field_sources
      Added value: +{
      +  "description": "Present only when the response joins parts from different origins or extraction instants (contract v1.2): for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Proveniência de um grupo de campos da resposta: de onde veio e quando foi extraído",
      +    "properties": {
      +      "data_vintage": {
      +        "description": "Vintage/competência da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "dataset_id": {
      +        "description": "Identificador do conjunto da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "fields": {
      +        "description": "Campos do payload atribuídos a esta sub-fonte",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "retrieved_at": {
      +        "description": "ISO-8601 da extração desta sub-fonte na origem",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "served_from_cache": {
      +        "description": "true se esta sub-fonte veio do cache do servidor (retrieved_at é o da extração original); false se foi buscada nesta chamada; null se o servidor não distingue",
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "source_url": {
      +        "description": "URL canônica da sub-fonte que originou estes campos",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "fields",
      +      "source_url",
      +      "dataset_id",
      +      "data_vintage",
      +      "retrieved_at"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  2. Changed1 schema field changedv1.17.1
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed3 schema fields changedv1.15.0
    • changedOutput schema / properties / provenance / description
      Previous value: -"Provenance block (contract v1.0): source, URL, data vintage, extraction instant, citation, license"New value: +"Provenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license"
    • addedOutput schema / properties / provenance / properties / retrieval
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "anomalies": {
      +          "description": "Anomalias superadas até o sucesso, somadas por classe, em ordem fixa; [] se nenhuma",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "count": {
      +                "description": "Ocorrências desta classe na chamada",
      +                "maximum": 9007199254740991,
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "kind": {
      +                "description": "Classe da anomalia (vocabulário fechado do contrato)",
      +                "enum": [
      +                  "timeout",
      +                  "network",
      +                  "http_4xx",
      +                  "http_5xx",
      +                  "rate_limited",
      +                  "malformed_body"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "count"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "attempts": {
      +          "description": "Tentativas somadas, incluindo as repetidas (>= requests)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "requests": {
      +          "description": "Idas distintas à origem que compõem esta resposta (fatias, páginas)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "unstable": {
      +          "description": "true se houve repetição (attempts > requests) ou alguma anomalia",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "requests",
      +        "attempts",
      +        "anomalies",
      +        "unstable"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Origin diagnostics of THIS source in this call (contract v1.1): requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)"
      +}
    • changedOutput schema / properties / provenance / required
      Previous value: -[
      -  "source",
      -  "source_url",
      -  "data_vintage",
      -  "retrieved_at",
      -  "citation",
      -  "license"
      -]New value: +[
      +  "source",
      +  "source_url",
      +  "data_vintage",
      +  "retrieved_at",
      +  "retrieval",
      +  "citation",
      +  "license"
      +]
  4. Addedv1.11.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, open-world and non-destructive traits, so the bar is lower; the description still adds value with the error behavior on unknown ids and the fact that it performs a live GET against the public source. It stops short of describing latency, caching, or failure modes when the source is unavailable.

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-loads the return contract, then placement, then behavior, using bold labels for scannability. Slightly heavy with the parenthetical enumeration of terminology families, but every section still carries information.

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?

Return fields, validation rule, sourcing behavior, and the boundary against sibling terminology tools are all covered, and an output schema exists so return-value detail need not be expanded further. Nothing essential to correct invocation is missing.

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% with a single `id` parameter, so the baseline is 3. The description adds a real constraint beyond the schema: the id must originate from `search`, and anything else errors — meaningful semantics the schema text does not convey.

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?

States a specific verb and resource ('Returns the full document for an id') and enumerates the returned fields, so the agent knows exactly what comes back. It also positions itself against the many sibling terminology tools by declaring itself the companion of `search` in the Deep Research contract.

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; an unknown id returns an error') and an explicit exclusion routing data queries to the `icd11_*`, `loinc_*`, `rxnorm_*`, etc. tools. When-to-use and when-not-to-use are both stated.

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