Skip to main content
Glama

inspect_document

Retrieve document structure from Word, PowerPoint, or Excel files, including worksheets, tables, outlines, paragraphs, styles, and node paths for precise edits.

Instructions

Inspect a Word, PowerPoint, or Excel document. Excel returns worksheets, tables, and a bounded cell list; use sheetId, range, and maximumCells to narrow it. Other formats return their outline, paragraphs, content controls, nodes, and styles. Copy anchors and node paths from this result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeYes
sheetIdYes
fidelityYescontent
documentIdYes
connectionIdYes
maximumCellsYes
paragraphLimitYes
paragraphOffsetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.7.0
    • addedInput schema / properties / maximumCells
      Added value: +{
      +  "default": 1000,
      +  "type": "integer"
      +}
    • addedInput schema / properties / range
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedInput schema / properties / sheetId
      Added value: +{
      +  "default": 0,
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "connectionId",
      -  "documentId",
      -  "fidelity",
      -  "paragraphOffset",
      -  "paragraphLimit"
      -]New value: +[
      +  "connectionId",
      +  "documentId",
      +  "fidelity",
      +  "paragraphOffset",
      +  "paragraphLimit",
      +  "sheetId",
      +  "range",
      +  "maximumCells"
      +]
  2. First observed

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the per-format return shape and hints at chaining ('copy anchors and node paths from this result'), but says nothing about permissions, the meaning of the fidelity levels, or pagination behavior for the paragraph offset/limit pair.

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?

Three sentences, front-loaded with the tool's scope, then branch-specific behavior, then a chaining hint. No filler, though the parameter list in the middle sentence could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, all-required tool with no annotations, no output schema, and zero schema coverage, the description leaves most of the contract unexplained. Return shape is sketched, but pagination, fidelity semantics, and required identifiers are absent, which is insufficient for correct invocation.

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?

Schema description coverage is 0% across 8 required parameters, so the description must compensate and largely does not. It explains only sheetId, range, and maximumCells; fidelity, paragraphOffset, paragraphLimit, connectionId, and documentId are left entirely opaque.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (inspect) and resource (Word/PowerPoint/Excel document), and goes further by spelling out the differing return shape per format. It implies a read-only inspection role that separates it from edit_document and open_document, though it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The Excel clause gives concrete narrowing guidance (sheetId, range, maximumCells), which is genuine when-to-use advice for that branch. However, there is no guidance on when to prefer this over find_in_document, open_document, or preview_plan, so the overall routing decision is left to inference.

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