Skip to main content
Glama

Inspect a document

inspect_document
Read-onlyIdempotent

Inspect Word, PowerPoint, or Excel files to retrieve outlines, paragraphs, styles, worksheets, tables, and cell data; use filters to narrow Excel results and copy anchors or node paths.

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

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so safety is covered. The description adds real behavioral detail beyond them: per-format return structure and the 'bounded cell list' limit, plus the note that anchors and node paths can be copied from the result — useful for downstream chaining. It omits how paragraph pagination behaves in practice.

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?

Three tight sentences, front-loaded with the core action, then Excel specifics, then other-format behavior. No filler or redundancy; each sentence carries distinct information.

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

Completeness3/5

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

With no output schema, the description correctly picks up the slack by describing what each format returns and the anchor-copying workflow. However, for an eight-parameter, all-required tool with zero schema coverage, the unexplained pagination (paragraphOffset/paragraphLimit) and fidelity parameters leave a real gap an agent must guess at.

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%, so the description must carry the burden, yet it explains only 3 of 8 parameters (sheetId, range, maximumCells) and gives their purpose merely as 'narrow it'. fidelity, connectionId, documentId, paragraphOffset, and paragraphLimit receive no meaning at all, leaving most parameters undocumented anywhere.

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?

States a specific verb (inspect) and resource (document) and scopes the supported formats (Word, PowerPoint, Excel), which separates it from write-side siblings like edit_document and apply_plan. It does not explicitly contrast with read-side siblings such as open_document or find_in_document, so the differentiation is implied rather than stated.

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?

It gives task-level guidance for Excel ('use sheetId, range, and maximumCells to narrow it'), which is genuinely useful. But it never says when to choose this tool over find_in_document, compare_documents, or open_document, nor states any prerequisites, so the selection guidance is only partial.

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