Skip to main content
Glama

Run a macro

execute-macro
Destructive

Run a Foundry VTT macro in the Gamemaster's browser and retrieve its result or error. Requires the macroExecution world setting enabled for chat or script macros.

Instructions

Run a macro in the Gamemaster's browser and report its result or error. Off by default: the world setting "macroExecution" must be "chat" for chat macros or "all" for script macros. A SCRIPT MACRO CAN DO ANYTHING a Gamemaster can, including deleting documents, and cannot be undone; read its command with list-macros first. A chat macro only posts to the chat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoNamed values a script macro receives as variables and as scope
aliasNoName shown as the speaker; defaults to the token or actor name
macroIdYesId or exact name of the macro
sceneIdNoScene id or exact name that holds speakerToken, when the id is on several scenes
speakerActorNoSpeak as this actor: its id or exact name
speakerTokenNoSpeak as this token: its uuid ("Scene.<id>.Token.<id>") or its id; never its name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already include destructiveHint=true and openWorldHint=true, so the destructive nature is disclosed. The description adds important context: script macros can do anything a Gamemaster can, including deleting documents, and cannot be undone. It also explains the off-by-default execution setting and difference between chat and script macros, which goes beyond 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 concise: three sentences with no fluff. It front-loads the core purpose, then the critical caveat about script macros, and ends with the distinction for chat macros. Every sentence earns its place, providing essential information without 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?

For a macro execution tool with complex security implications, the description covers the essential operational context: the required world setting, the risk of script macros, and the behavior of chat macros. There is no output schema, but the description mentions 'report its result or error' which suffices. Given the complexity, the description is complete enough for an agent to invoke 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?

The schema description coverage is 100%, meaning all parameters are described in the schema (e.g., args, alias, macroId). The description itself doesn't add extra parameter details beyond what the schema provides, but it does mention 'read its command' and 'speaker' nuances that align with parameters. Since schema coverage is high, the baseline is 3, and no description compensation is needed.

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 that the tool executes a macro in the Gamemaster's browser and reports the result or error. It specifies the resource (macro) and the action (run/execute), distinguishing it from sibling tools like list-macros (which lists macros) and create-macro (which creates macros).

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 provides explicit usage guidance: it mentions the world setting requirement ('macroExecution' must be 'chat' or 'all') and instructs to read macro commands with list-macros before executing script macros. It also distinguishes between chat macros (post to chat) and script macros (can do anything), implicitly guiding when to use this versus other tools.

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

Deploy Server

Other Tools