Skip to main content
Glama
rcarmo

office-document-mcp-server

by rcarmo

office_inspect

Read-only

Inspect document structure and metadata across Excel, Word, and PowerPoint files. Returns requested details such as sheets, tables, comments, slides, sections, or shapes.

Instructions

Inspect document structure and metadata.

Auto-detects document format and returns requested structural information.

Replaces: excel_list_sheets, excel_list_tables, excel_list_named_ranges, excel_list_merged_cells, excel_get_comments, excel_get_change_log, word_list_sections, word_list_tables, word_check_tracking, pptx_list_slides, pptx_list_shapes, pptx_list_masters, pptx_get_notes, pptx_get_comments, pptx_get_hidden_slides

Examples: # List all sheets in Excel workbook office_inspect(file_path="data.xlsx", what="sheets")

# List tables in Excel
office_inspect(file_path="data.xlsx", what="tables")

# Get comments from Excel
office_inspect(file_path="data.xlsx", what="comments")

# List slides in PowerPoint
office_inspect(file_path="deck.pptx", what="slides")

# List sections in Word
office_inspect(file_path="report.docx", what="sections")

# Get shapes on a specific slide
office_inspect(file_path="deck.pptx", what="shapes", target="3")

Args: file_path: Path to the document what: What to inspect: - "structure": Overview of document structure - "sheets": Excel sheets list - "slides": PowerPoint slides list - "sections": Word sections list - "tables": Tables in document - "named_ranges": Excel named ranges - "merged_cells": Excel merged cell regions - "comments": Comments/notes in document - "tracking": Track changes status (Word) - "shapes": Shapes on a slide (PowerPoint) - "masters": Slide masters (PowerPoint) target: Optional target for scoped inspection: - Sheet name for Excel - Slide number for PowerPoint

Returns: Dictionary with inspection results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the document
whatNoWhat to inspect
targetNoOptional target for scoped inspection
Behavior5/5

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

Annotations declare readOnlyHint: true and destructiveHint: false, and the description consistently describes an inspection (read-only) operation. The description further adds behavioral context such as auto-detection of format and unified replacement of many tools, fully aligning with annotations.

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?

The description is well-structured: a concise first-line summary, a note on auto-detection, a replacement list, a comprehensive examples section, and an Args section. All sentences add value, no redundancy.

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 (3 parameters, read-only, no output schema), the description fully covers necessary context. It explains how to use the tool with different document types, lists all inspection options, and provides clear examples. The return type is mentioned as a dictionary.

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

Parameters5/5

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

Schema coverage is 100%, but the description provides extensive additional meaning: it explains each allowed 'what' value with context, describes the 'target' parameter's usage for different document types, and includes examples. This goes beyond the schema's minimal parameter descriptions.

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 states the tool inspects document structure and metadata, auto-detects format, and lists many specific inspection types. It clearly differentiates from sibling tools like office_read, office_patch, and the replaced tools such as excel_list_sheets by stating it replaces them.

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?

The description explicitly lists which tools this tool replaces, providing clear guidance on when to use it instead of alternatives. It also explains auto-detection of document format and includes examples covering common use cases.

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/rcarmo/python-office-mcp-server'

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