Skip to main content
Glama

run_macro

Run a VBA macro in an Excel workbook by specifying the macro name and optional arguments; the workbook is saved and session reloaded to reflect changes.

Instructions

Run a VBA macro in the workbook via Excel, then reload the session so changes the macro made are visible to the other tools.

Only .xlsm workbooks can hold macros. macro_name is the procedure name (e.g. 'FormatReport' or 'Module1.FormatReport'); args are passed through. The workbook is saved after the macro runs. Requires Microsoft Excel on Windows (uv sync --extra com), and macros must be trusted for automation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
macro_nameYes
session_idYes
Behavior4/5

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

Given no annotations, the description carries full burden and discloses key behaviors: session reload after macro, workbook save, and requirement for trusted macros. It could mention potential errors or side effects, but the provided information is adequate for understanding the tool's operation.

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?

The description is concise, with three sentences each adding value. The main purpose is front-loaded. It could be slightly more structured, but overall it is efficient and clear.

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

Completeness4/5

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

For a macro execution tool with 3 parameters and no output schema, the description covers prerequisites, behavior, and parameter details. It is nearly complete; missing error handling or return info is acceptable given the tool's nature.

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?

The description explains macro_name as the procedure name with examples, and notes args are passed through. With 0% schema description coverage, this adds essential meaning to the parameters. session_id is not explained but is a common pattern.

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 clearly states the tool runs a VBA macro in a workbook via Excel, with a specific verb ('Run') and resource ('VBA macro'). It distinguishes from sibling tools by being the only macro execution tool among many Excel manipulation tools.

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?

The description provides prerequisites (only .xlsm workbooks, requires Excel on Windows, macros must be trusted), guiding when the tool can be used. However, it does not explicitly mention when not to use it or compare with alternatives, but the context of siblings makes it clear this is the sole macro tool.

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/ShubhamDbug/Excel-MCP'

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