Skip to main content
Glama

doc_read

Read-onlyIdempotent

Read-only queries on the open document (a file whose kind is DOC). No data is modified. Safe to auto-approve. Open the document first with files_write(open_file). Call as {"action": "", "params": {...}}.

Blocks are named by a path "." (e.g. "0.3") and carry a hash; doc_write needs the hash to change or delete a block.

Actions: • doc_outline() — Headings with their paths and hashes, plus block count, word count and block types. Start here for long documents. • read_doc(format?, from?, limit?) — Blocks in order, each {path, hash, type, content}. format: "markdown" (default) or "json" (ProseMirror JSON). Paginate with from (default 0) and limit (default 200, max 1000); next_from is null on the last page. • search_doc(query, limit?, case_sensitive?, whole_word?, regex?) — Text matches, each with the block's path and hash and a snippet. • context() — The full guide to documents: block model, Markdown support, placeholders, batches.

Input Schema

NameRequiredDescriptionDefault
actionYesAction to perform: read_doc, doc_outline, or search_doc
paramsNoParameters for the action (see tool description)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses the required open-file prerequisite, pagination defaults and limits, the next_from null condition, and the block path/hash model. These are substantial behavioral details an agent needs before calling.

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 front-loaded with the read-only scope and prerequisite, then organized into a scannable action list. The detail is proportionate to a multi-action tool and no sentence is wasted.

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?

With no output schema, the description explains the shape of each action's return values, including block paths, hashes, pagination fields, and search snippets. It gives enough context for an agent to invoke and interpret the tool without further documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema has full description coverage, it only generically describes action and params. The description compensates by documenting each action name and its parameters, including defaults, formats, pagination arguments, and search options.

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: read-only queries on the open DOC document. It distinguishes itself from doc_write by noting that no data is modified and from files_read by scoping to files whose kind is DOC.

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?

It gives clear prerequisites (open the document first with files_write(open_file)) and recommends doc_outline as the starting point for long documents. It lacks an explicit statement naming doc_write as the alternative for modifications, though the read-only framing implies it.

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.