Skip to main content
Glama

read_document

Read Markdown or DOCX documents as structured blocks with stable IDs. Use section_id to target specific sections, pass doc_hash to detect external modifications, and see unmodeled features like images or footnotes.

Instructions

Read a Markdown or DOCX document as structured blocks.

Returns headings, paragraphs, list items and tables with stable IDs (h-0, p-1, li-2, tbl-0). Prefer section_id= over reading whole documents. Pass doc_hash from a previous call to detect external modifications. Lists unmodeled_features so you know what the model cannot represent (images, footnotes, ...).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
doc_hashNo
section_idNo
include_spansNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses the output format (headings, paragraphs, list items, tables with stable IDs), the behavior of listing unmodeled_features, and the use of doc_hash for change detection. It implies read-only but does not explicitly state it; however, the presence of these details demonstrates transparency beyond a simple read action.

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?

Three sentences with zero waste. The main purpose is stated first, followed by actionable tips. Every sentence adds value, and the structure is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The presence of an output schema shifts the burden of return-value documentation to schema, which is appropriate. The description adds key context: usage guidance for parameters, the nature of returned blocks, and the list of unmodeled features. Minor gaps remain (e.g., include_spans semantics, error behavior), but overall it is sufficient for an agent to call the tool correctly.

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?

The schema has 0% description coverage, so the description must compensate. It explains section_id and doc_hash meaningfully, but path and include_spans are left to their names. This partial coverage is a moderate contribution, but not complete for all parameters.

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 ('Read'), resource ('Markdown or DOCX document'), and output ('structured blocks'). It differentiates the tool's purpose from siblings by emphasizing structured representation and stable IDs, which is distinct from outline-only or search tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Explicit guidance is given for using section_id ('Prefer section_id over reading whole documents') and doc_hash ('Pass doc_hash from a previous call to detect external modifications'). While it does not explicitly compare with siblings, the usage tips provide clear context for how to invoke the tool effectively.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xyyyang97/doc-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server