Skip to main content
Glama

doc_info

Read-onlyIdempotent

Inspect a .docx before editing: check size, SHA-256, core properties, Track Changes, lock status, paragraph count, comments, notes, and headers.

Instructions

Cheap first look at a file: size, sha256 (pass it as expect.sha256 to a later write so it is refused if the file changed meanwhile), core properties (title, author, dates), whether Track Changes is on, whether Word holds it open (a ~$ lock file) and which parts exist (comments, notes, headers). The envelope's doc gives the paragraph count. Use doc.stats for word, heading and revision counts, doc.outline for the headings. Read-only; DOC_NOT_FOUND or NOT_A_DOCX for a bad path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesPath to the .docx.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesAlways true on success.
opYesThe operation that ran.
apiYesAPI version (1.0).
docNoThe document read or written: path, sha256 and paragraph count.
nextYesCursor for the next page (pass as cursor), or null.
resultYesWhat the operation returns.
warningsYesThings to know about the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "api": {
      +      "description": "API version (1.0).",
      +      "type": "string"
      +    },
      +    "doc": {
      +      "description": "The document read or written: path, sha256 and paragraph count.",
      +      "properties": {
      +        "characters": {
      +          "description": "text.normalize of a text string: its length.",
      +          "type": "integer"
      +        },
      +        "paragraphs": {
      +          "description": "Body paragraphs.",
      +          "type": "integer"
      +        },
      +        "path": {
      +          "description": "Path of the document.",
      +          "type": "string"
      +        },
      +        "sha256": {
      +          "description": "sha256 of the file (pass as expect.sha256 to a write).",
      +          "type": "string"
      +        },
      +        "source": {
      +          "description": "A .txt/.md/.odt source's format, encoding and split mode; \"text\" for a text string (text.normalize).",
      +          "type": [
      +            "object",
      +            "string"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "next": {
      +      "description": "Cursor for the next page (pass as cursor), or null.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ok": {
      +      "description": "Always true on success.",
      +      "type": "boolean"
      +    },
      +    "op": {
      +      "description": "The operation that ran.",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "What the operation returns.",
      +      "properties": {
      +        "application": {
      +          "description": "Application properties present (docProps/app.xml).",
      +          "properties": {
      +            "application": {
      +              "description": "Program that wrote it.",
      +              "type": "string"
      +            },
      +            "pages": {
      +              "description": "Page count Word saved.",
      +              "type": [
      +                "integer",
      +                "string"
      +              ]
      +            },
      +            "words": {
      +              "description": "Word count Word saved.",
      +              "type": [
      +                "integer",
      +                "string"
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "has": {
      +          "description": "Which parts exist.",
      +          "properties": {
      +            "comments": {
      +              "description": "A comments part.",
      +              "type": "boolean"
      +            },
      +            "endnotes": {
      +              "description": "An endnotes part.",
      +              "type": "boolean"
      +            },
      +            "footers": {
      +              "description": "Footer parts.",
      +              "type": "integer"
      +            },
      +            "footnotes": {
      +              "description": "A footnotes part.",
      +              "type": "boolean"
      +            },
      +            "headers": {
      +              "description": "Header parts.",
      +              "type": "integer"
      +            },
      +            "styles": {
      +              "description": "A styles part.",
      +              "type": "boolean"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "parts": {
      +          "description": "Parts in the package.",
      +          "type": "integer"
      +        },
      +        "properties": {
      +          "description": "Core properties present (docProps/core.xml).",
      +          "properties": {
      +            "created": {
      +              "description": "Created (ISO 8601).",
      +              "type": "string"
      +            },
      +            "creator": {
      +              "description": "Author.",
      +              "type": "string"
      +            },
      +            "last_modified_by": {
      +              "description": "Last modified by.",
      +              "type": "string"
      +            },
      +            "modified": {
      +              "description": "Modified (ISO 8601).",
      +              "type": "string"
      +            },
      +            "revision": {
      +              "description": "Revision number.",
      +              "type": [
      +                "integer",
      +                "string"
      +              ]
      +            },
      +            "subject": {
      +              "description": "Subject.",
      +              "type": "string"
      +            },
      +            "title": {
      +              "description": "Title.",
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "size_bytes": {
      +          "description": "File size in bytes.",
      +          "type": "integer"
      +        },
      +        "tracked_changes_on": {
      +          "description": "Whether Track Changes is switched on in the document.",
      +          "type": "boolean"
      +        },
      +        "word_lock": {
      +          "description": "Whether a Word lock file (~$name) is next to it: open in Word.",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "size_bytes",
      +        "parts",
      +        "properties",
      +        "application",
      +        "tracked_changes_on",
      +        "word_lock",
      +        "has"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "description": "Things to know about the result.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "api",
      +    "ok",
      +    "op",
      +    "result",
      +    "warnings",
      +    "next"
      +  ],
      +  "type": "object"
      +}
  2. Addedv0.1.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint, but the description adds substantial context beyond them: the lock-file detection for an open document, the staleness-check contract around sha256, and the specific error outcomes (DOC_NOT_FOUND, NOT_A_DOCX). This is far richer than the safety profile alone.

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?

A single dense paragraph, front-loaded with the 'cheap first look' framing followed by the payload contents and routing hints. Nearly every clause carries information, though the sha256/expect.sha256 aside is a touch embedded and could be tighter.

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 an output schema present the description needn't explain returns, yet it still previews the envelope (doc paragraph count), states the error codes, and routes to alternatives. Nothing an agent needs to call it correctly is missing.

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?

There is one parameter and schema description coverage is 100%, so the schema already fully documents 'doc' as the path to the .docx. The description adds no syntax or format detail beyond that. Per the baseline rule for high coverage, a 3 is appropriate.

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?

States a specific verb+resource ('Cheap first look at a file') and enumerates exactly what it returns: size, sha256, core properties, Track Changes state, lock file, and existing parts. It explicitly distinguishes itself from doc.stats and doc.outline, so an agent can tell it apart from those siblings without opening any schema.

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?

Names the alternatives explicitly ('Use doc.stats for word, heading and revision counts, doc.outline for the headings') and frames itself as the cheap first-pass call. It also describes the intended downstream workflow (pass sha256 as expect.sha256 so a later write is refused if the file changed), giving concrete when-to-use guidance.

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