Skip to main content
Glama

diagnose_document

Read-only

Produce a read-only structural health report for a Word file, identifying orphan parts, dangling relationships, broken references, and other integrity issues from the saved XML.

Instructions

Produce a one-call structural health report, read-only: content-type coverage, dangling relationships and orphan parts, field balance per story part, footnote/endnote integrity, references to undefined styles and numbering, content-control and bookmark sanity, duplicate revision ids, missing image targets, broken cross-references, and a per-part size profile. Never fails on a weird-but-openable document; every check degrades to a reported problem, and healthy=false only for problems that render broken or lose content in Word. The deep companion to validate(checks=['core']). No live mode BY DESIGN: this reads the saved package's XML, stale while Word holds unsaved changes. Close the document first, or use com_validate_opens_clean (com-live pack) / live get_document_info. The full validate check battery lives in the academic pack.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.1

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses important behavior: it never fails on weird-but-openable documents, every check degrades to a reported problem, healthy=false is reserved for content-breaking issues, and results are stale while Word holds unsaved changes. This gives the agent a realistic model of the tool's failure behavior and freshness guarantees.

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?

The description is dense but purposeful; the long checklist is justified because it precisely defines the report's contents. It is front-loaded with the core purpose before getting into alternatives and caveats. Minor redundancy exists in saying both 'No live mode BY DESIGN' and 'this reads the saved package's XML,' but no filler sentences are present.

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 tool's complexity—one parameter, read-only structural analysis, subtle staleness semantics, and sibling alternatives—the description covers all necessary context: what it checks, when it is stale, how to avoid staleness, and which alternatives to use. An output schema exists, so return-value details do not need to be in the description.

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?

The schema has one parameter, file_path, with no description (0% schema description coverage). The description partially compensates by explaining that the tool reads 'the saved package's XML' and instructs the agent to 'close the document first', implying file_path must point to a saved, closed document. It doesn't specify supported file extensions, but the single well-named parameter makes this sufficient.

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 resource: 'Produce a one-call structural health report, read-only', followed by a detailed list of checks. It clearly differentiates itself from siblings by labeling it 'The deep companion to validate(checks=['core'])' and contrasts it with live alternatives like com_validate_opens_clean and get_document_info.

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 explicitly states when to use this tool over alternatives: 'No live mode BY DESIGN: this reads the saved package's XML, stale while Word holds unsaved changes. Close the document first, or use com_validate_opens_clean.../live get_document_info.' It also points to the academic pack for the full validate check battery, giving an agent clear routing guidance.

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