Skip to main content
Glama
WilliamSmithEdward

xlide-excel-word-powerpoint-access-office-vba-mcp

Read module

xlide_read_module
Read-onlyIdempotent

Retrieve VBA module source from Office files, optionally limited to a line range. Get a content token to ensure safe concurrent writes.

Instructions

The canonical way to read VBA. Returns a module's source as the VBA editor shows it, with the attribute header stripped, plus a content_token. Pass that token back as expected_content_token when you write, and the write is refused if anything changed the module in between. start_line and end_line read a slice of a long module; both are 1-based and inclusive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_lineNoLast line to return. 0 means the end.
file_pathYesAbsolute path to the Office file.
start_lineNoFirst line to return. 0 means the start.
module_nameYesModule name, matched without case.
include_headerNoInclude the Attribute VB_* header. Off by default: the header is managed for you on write, and editing it by hand is how a module loses its binding to a sheet or a form.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The description adds meaningful behavior beyond the readOnly/idempotent annotations: the attribute header is stripped, a content_token is returned and later used to refuse writes if the module changed, and line slices are 1-based and inclusive. These are non-obvious behaviors an agent needs to invoke the tool correctly.

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 compact and well organized: lead with the tool's role, then the return value, then the token semantics, then the slicing behavior. Every sentence carries relevant information and nothing is redundant.

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?

For a read tool with five parameters and an output schema, the description covers the important operational details: what is returned, how the header is handled, how the content_token flows into a write, and how slicing works. The schema fills in the remaining parameter specifics, so nothing critical is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds useful parameter semantics by explaining that start_line and end_line define an inclusive 1-based slice, and by clarifying the default header-stripping behavior. This goes beyond the schema's brief 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 opens with 'The canonical way to read VBA' and specifies that it returns a module's source as the VBA editor shows it. This clearly identifies the resource (module source), the action (read), and sets it apart from sibling read tools like read_form or read_cells.

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

Usage Guidelines4/5

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

Calling this the 'canonical way to read VBA' gives a strong usage signal and implies it is the default choice for module reading. It does not explicitly name alternative tools or state when not to use it, but the context is clear enough for routing.

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