Skip to main content
Glama

Get Document View

get_document_view

Read a Word document as anchored markdown with stable paragraph IDs for bulk editing. Supports headings, tables, comments, and optional structure detail—ideal for orientation and low-token editing.

Instructions

Read the document as an anchored markdown projection, the low-token alternative to get_text for orientation and bulk editing. One block per paragraph, prefixed [hex] with a stable anchor id (from w14:paraId, which survives edits elsewhere in the document); headings carry # prefixes, tables render as pipe tables under [t:hex] with cells addressed t:hex:rNcN (1-based). Anchors work in every location object ({"anchor": "hex"}) and in apply_edits ops. scope: {"outline": "3.2"} for one heading's section, or {"paragraphs": {"start": N, "end": M}} (end exclusive); omit for the whole document. detail: "structure" (headings and counts only), "text" (default), "full" (adds {++ins++}/{--del--} revision markers and [cN] comment refs with an author legend). include: {"tables": false} to skip tables, {"notes": "inline"} to append footnote/endnote text. Documents without paraIds get VOLATILE anchors (flagged in the header) that change with any edit; stamp_anchors=true writes real paraIds so anchors become durable. Stamping is the ONE mutation this tool can make and runs only when explicitly requested, with the normal backup and validated save; plain reads never modify the file. A document open in Word is read from its last saved state. To locate a string, use find_text; to enumerate collections, use list_elements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNo
detailNotext
includeNo
file_pathYes
stamp_anchorsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A5/5.0
Behavior5/5

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

Annotations say readOnlyHint=false, and the description reveals the single mutation path: 'Stamping is the ONE mutation this tool can make and runs only when explicitly requested, with the normal backup and validated save; plain reads never modify the file.' It also discloses volatile anchors without paraIds, the effect of stamp_anchors, and that Word-open documents are read from last saved state — substantial behavior beyond structured annotations.

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?

Despite being long, the prose is dense and logically ordered: purpose and output format first, then parameter semantics, then behavioral caveats, then sibling routing. Every clause adds signal and does not repeat schema or annotation content.

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 tool with 5 parameters, one mutating flag, anchor durability concerns, and multiple output details, the description covers all needed operational context: projection layout, anchor IDs, scope forms, detail levels, table addressing, revision/comment output, optional include behaviors, mutation semantics, and fallback alternatives. The existing output schema relieves it from explaining return values.

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?

Input schema has 0% description coverage, so the description carries the full parameter load. It does: scope gives concrete JSON examples and end-exclusive semantics, detail enumerates the three levels with their markers, include gives example values, stamp_anchors is explained with durability implications, and file_path is the obvious required target. Nothing is left unexplained.

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 opens with a specific verb and object ('Read the document as an anchored markdown projection') and immediately positions it against get_text ('low-token alternative ... for orientation and bulk editing'). It goes on to specify the output shape (blocks, [hex] anchors, headings, tables), so an agent can distinguish it from siblings without opening 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?

It names the primary sibling alternative (get_text) with the exact tradeoff ('low-token alternative') and closes with explicit routing: 'To locate a string, use find_text; to enumerate collections, use list_elements.' This gives clear when-to-use context and points away from the tool for other jobs.

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