Skip to main content
Glama
WilliamSmithEdward

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

Point a shape at a macro

xlide_set_shape_macro
DestructiveIdempotent

Change the macro assigned to an existing shape or button and save the workbook. Empty macro clears the link; the target macro must already exist in the project.

Instructions

Changes which macro an existing shape or button runs when clicked, and saves the workbook. An empty macro clears the link. Use it after writing a Sub, so a button actually calls it, and after renaming one, because nothing rewrites an OnAction. Give the procedure as Proc or Module.Proc; it must already exist in the project, so write it first. This changes an existing shape only: adding or deleting one is not offered, because a form control lives in four parts that have to agree and a wrong one produces a workbook Excel repairs on open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
macroYesThe procedure to run, as Proc or Module.Proc. Empty clears the link.
sheetYesWorksheet the shape is on.
file_pathYesAbsolute path to the Excel file.
shape_nameYesShape name, as xlide_list_shapes reports it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: it saves the workbook as a side effect, an empty macro clears the link, the macro must already exist (otherwise failure), and it warns about the corruption risk if shape parts are inconsistent. This goes well beyond the destructiveHint and idempotentHint flags, giving the agent a realistic expectation of side effects and prerequisites.

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-structured: the main action is front-loaded, and each subsequent sentence adds distinct value (clearing behavior, when to use, prerequisites, and a warning). There is no fluff or redundancy, making it efficient for an agent to parse.

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?

The description covers purpose, usage timing, prerequisites, side effects, and limitations (only existing shapes). With an output schema and annotations, this is sufficient for an agent to invoke the tool correctly. It doesn't detail error handling or what happens if the shape isn't found, but that is likely covered by the output schema or expected behavior.

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 coverage is 100%, and the schema already documents all four parameters, including the macro format (Proc or Module.Proc) and the empty-clears behavior. The description reinforces this and adds a note about writing the macro first, but this is more of a usage guideline than new parameter semantics. Thus a baseline 3 is appropriate.

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?

The description clearly states the tool changes which macro a shape runs when clicked and saves the workbook. It specifies the resource (existing shape/button) and the action (changing its OnAction), and explicitly notes it does not add or delete shapes, which helps distinguish it from shape management tools. While it doesn't name specific sibling tools, the purpose is unambiguous.

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 gives concrete usage timing: use it after writing a Sub or after renaming a macro, because nothing rewrites an OnAction. It also explicitly states it only works on existing shapes and does not handle adding/deleting, which tells the agent when not to use it. It doesn't name alternative tools, but the guidance is clear and actionable.

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