Skip to main content
Glama
WilliamSmithEdward

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

Run VBA source

xlide_run_vba
Destructive

Run VBA code in Office documents to test macros or extract data, returning output and errors as data without dialogs.

Instructions

Injects VBA source into a document and calls one procedure from it, under a deadline. Windows only. Use it to check what a piece of code actually does before writing it into a file, or to read something out of a document that no existing macro exposes. With no file_path it runs in a new empty document. Errors come back as data with the failing line and call stack, never as a dialog. Call PyVbaLog "text" from the code to return output; Debug.Print and MsgBox do not work under automation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoArguments, in order. Scalars only.
hostNo'excel', 'word', 'powerpoint' or 'access'. Ignored with file_path.excel
sourceYesVBA source to inject.
timeoutNoSeconds before the run is terminated.
file_pathNoRun against this document instead of a new empty one.
procedureNoProcedure to call. Empty calls the first one in the source.
read_onlyNoOpen the document read-only.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, it discloses Windows-only behavior, no-dialog error reporting with failing line and call stack, PyVbaLog as the output channel, and that Debug.Print/MsgBox fail under automation. It also states that missing file_path creates a new empty document, and the destructiveHint annotation is consistent with executing arbitrary code.

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 front-loaded with the core action, then gives platform, use cases, default-document behavior, error shape, and output mechanism. Every sentence contributes a distinct fact; no filler.

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 7-parameter execution tool, the combination of schema descriptions, annotations, output schema, and this description covers what the tool does, how to get results, how errors surface, and platform constraints. Nothing essential is missing for an agent to invoke it correctly.

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?

Schema description coverage is 100%, so the schema already explains all 7 parameters. The description adds one param-related behavior, behavior when file_path is omitted, but that is already implied by the schema description, so no substantial extra semantic value is added.

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 exact operation: inject VBA source into a document and call one procedure, with a platform constraint. It also distinguishes itself from persisted-module tools by framing it as a way to check code before writing it to a file and to read data no existing macro exposes.

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?

It gives explicit when-to-use guidance: for testing code before writing it to a file and for extracting values not exposed by existing macros. It doesn't mention when not to use it or name sibling alternatives like xlide_run_macro, but the context is clear enough to route an agent.

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