Skip to main content
Glama

Document Read

document_read
Read-onlyIdempotent

Read accessible campaign documents as text or download them as PDFs. Use ETags to conditionally fetch only changed files, preserving cached copies.

Instructions

Read an accessible document as text or a local binary download. Use document_list/campaign_document_list to discover IDs; use document_update to replace txt/md content. Upstream checks asset visibility, including shared access. Does not modify upstream data, but binary reads atomically replace downloads/.pdf (or .bin) locally; readOnlyHint refers to the upstream resource. Text returns mime_type/etag/content. Binary returns mime_type/etag/file_path/file_size, never inline bytes. Pass etag unchanged for a conditional read: 304 returns not_modified=true without content, so retain your cached copy. Repeated reads may refresh the local file. Returns {ok:true,data} on success; tool-body failures return {ok:false,error} with optional diagnostic data. Argument-schema errors are MCP errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
etagNoPrevious response ETag, passed unchanged as If-None-Match; null requests content without a cache condition.
document_idYesDocument asset ID; only ASCII letters, digits, underscores, and hyphens are accepted because it also names a local file.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations carry readOnlyHint/idempotentHint, but the description adds crucial nuance: binary reads 'atomically replace downloads/<id>.pdf locally' while 'readOnlyHint refers to the upstream resource.' It also discloses upstream visibility checks, conditional-read semantics, and the {ok:false,error} failure envelope — all context the annotations alone do not provide.

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 purpose, then usage, behavior, return modes, and error format in a logical order; every sentence carries information. Slightly longer than strictly necessary since the output schema already documents return fields, but the density is justified by the tool's two modes and local side effects.

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 output schema covers return values and annotations cover safety hints, the description still supplies everything an agent needs: discovery flow, local file side-effect disclosure, conditional caching semantics, and the distinction between tool-body failures and MCP argument-schema errors. Nothing needed for 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%, so baseline is 3. The description adds genuine value by explaining the etag's behavioral consequence — '304 returns not_modified=true without content, so retain your cached copy' — which goes beyond the schema's request-side description of If-None-Match. It reinforces the mode-dependent return fields but leans partly on the output schema.

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 and resource: 'Read an accessible document as text or a local binary download.' It also distinguishes itself from siblings by naming document_list/campaign_document_list for ID discovery and document_update for content replacement, so an agent can route correctly without opening other schemas.

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?

Explicitly routes the agent: 'Use document_list/campaign_document_list to discover IDs; use document_update to replace txt/md content.' It also explains when to use the etag parameter (conditional read with 304 handling) and how to interpret the not_modified response, leaving no ambiguity about invocation flow.

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