Skip to main content
Glama

Fetch Document

fetch
Read-only

Retrieves a document by ID (permalink, title, or memory URL) from search results and returns its content as JSON for OpenAI/ChatGPT connectors. Other clients should use read_note instead.

Instructions

OpenAI/ChatGPT connector fetch adapter. Takes an id from search results (permalink, title, or memory:// URL) and returns one text item holding JSON {id, title, text, url, metadata}. Other MCP clients receive an unsupported-client error; use read_note instead.

Input Schema

NameRequiredDescriptionDefault
idYesDocument identifier (permalink, title, or memory URL)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.24.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / id / description
      Added value: +"Document identifier (permalink, title, or memory URL)"
    • removedInput schema / properties / id / title
      Removed value: -"Id"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  2. Addedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

The annotations already establish read-only, non-destructive, and closed-world behavior. The description adds valuable connector-specific behavior: unsupported MCP clients receive an error, and the return payload is a single text item containing JSON.

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 short and front-loaded: caller scope, input source, return shape, and fallback are all stated without wasted sentences.

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 read-only fetch tool with annotations and an output schema, the description covers the necessary caller constraints, input expectations, return behavior, and the alternative tool. Nothing important is missing for correct invocation.

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 id parameter is already documented. The description adds useful context by saying the id should come from search results and that it may be a permalink, title, or memory:// URL.

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 verb and resource: it fetches one document by id and returns a text item containing JSON. It also distinguishes the tool from sibling read_note by explaining that other MCP clients should use read_note instead.

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?

It explicitly identifies the intended caller (OpenAI/ChatGPT connector), the source of the id (search results), and the alternative for unsupported MCP clients (read_note). This gives clear when-to-use and when-not-to-use guidance.

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