Skip to main content
Glama

diagnose_document

Run a read-only structural health check on Word .docx files: identifies content-type coverage, dangling relationships, broken cross-references, undefined styles, and size issues.

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 ok=false only for problems that render broken or lose content in Word. The deep companion to validate_document's quick check.

No live mode BY DESIGN: this reads the saved package's XML, stale while Word holds unsaved changes. Close the document first (com_close_open_document saves and closes), or use com_validate_opens_clean / live get_document_info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations to lean on, the description carries the full behavioral burden and does so thoroughly: it declares read-only semantics, explains the never-fail degradation contract and ok=false criterion, and discloses that results are stale while Word holds unsaved changes. This goes well beyond the schema.

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 organized: purpose, failure behavior, sibling positioning, then the live-mode caveat. The long list of checks is informative rather than filler, though it could arguably be tightened without losing meaning.

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 that an output schema exists, the description does not need to explain return values. It covers scope, failure semantics, the stale-by-design limitation, preconditions (close the document), and alternatives, so an agent has enough context to decide when and how to call the tool.

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

Parameters2/5

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

The only parameter, file_path, has 0% schema description coverage and the description never explicitly explains what the value must be (existing file path, docx package, etc.). The tool name makes the intent inferable, but for a one-parameter tool with an empty schema description the description should have compensated.

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') and enumerates the exact checks, making the tool's scope unmistakable. It also positions itself as 'the deep companion to validate_document's quick check,' distinguishing it from the most similar sibling.

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 not to use the tool ('No live mode BY DESIGN'), tells the user to close the document first, and names concrete alternatives (com_close_open_document, com_validate_opens_clean, live get_document_info). The relationship to validate_document is also clearly stated.

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/nometalalchemist/KitchenSink4Word'

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