Skip to main content
Glama

Get document

get-document
Read-onlyIdempotent

Get the full content of a document by ID.

WHEN TO USE:

  • To read a complete policy document or procedure

  • To review a document before updating it

  • When you know the document ID (from list-documents or a previous interaction)

RETURNS: The full document — content, title, tags, folder and metadata; for a stored file its file (name, type, size, SHA-256) and evidence_for, the live events (an invoice, a bill, a statement balance) that name it.

RELATED TOOLS:

  • get-document-section returns one search-indexed section from OpenSearch; use it to drill into a search hit. This tool reads the whole document from PostgreSQL, which is the source of truth, so use it for reading and editing

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": {
      "document_id": "<document_id>"
    },
    "name": "get-document"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYesDocument ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description still adds real context beyond them: it returns the whole document from PostgreSQL as source of truth, and discloses file metadata (SHA-256) and the evidence_for link to live events. It stops short of error behavior for a missing/invalid ID and any permission requirements, which keeps it off a 5.

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 a one-line purpose, then scannable bolded blocks for when-to-use, returns and related tools; nothing is filler. The markdown section headers are slightly heavy for a single-parameter read tool, and the RETURNS block could trim detail like SHA-256 without losing value.

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?

No output schema exists, yet the description enumerates the returned shape (content, title, tags, folder, metadata, file fields, evidence_for), so the agent knows what to expect. Combined with the source-of-truth distinction and the sibling routing, nothing needed to call this correctly 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?

With one parameter at 100% schema coverage the baseline is 3, but the description adds provenance the schema lacks, telling the agent where a valid document_id comes from (list-documents or a previous interaction). It adds no format details, so it is an increment rather than a transformation.

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 ('Get the full content of a document by ID') and explicitly contrasts itself with get-document-section, naming the underlying stores (PostgreSQL source of truth vs. OpenSearch index). An agent can pick between them without opening either 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?

A dedicated WHEN TO USE block gives three concrete triggers (read a whole policy, review before update, known ID), and RELATED TOOLS names the alternative plus the condition that selects it (drill into a search hit). Includes how the ID is obtained (list-documents or prior interaction).

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.