Skip to main content
Glama

Create a macro

create-macro

Create chat or script macros in Foundry VTT by specifying a name, command, optional icon, and folder path. Macros can hold chat text, rolls, or JavaScript.

Instructions

Create a macro. A chat macro holds chat text or a chat command such as /roll 1d20. A script macro holds JavaScript that can do anything a Gamemaster can once someone runs it. Creating runs nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imgNoOptional icon path
nameYesName of the macro
typeYes"chat" or "script"
commandYesChat text or JavaScript
folderPathNoFolder for the macro; nested levels separated by "/" are created

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only carry all-false hints, providing no safety or side-effect information. The description adds important behavioral context: 'Creating runs nothing' clarifies that creation has no immediate execution side effect, and it warns that script macros can do anything a Gamemaster can once run. These details go beyond the structured 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 three sentences with no filler. The opening sentence 'Create a macro' front-loads the core action, followed by the two macro type explanations and a key behavioral note. Every sentence earns its place.

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 simple create tool with no output schema, the description covers the essential behavior (creating a macro without running it), differentiates macro types, and implies the risk of script macros. It does not mention return values or prerequisites like permissions, but those are not critical for an agent to invoke the tool correctly. The core usage context is complete.

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 meaning beyond the schema by defining the 'type' enum values (chat vs. script) with concrete examples like '/roll 1d20' and explaining what each type holds. It does not add detail for name, img, or folderPath, but the schema already covers those adequately.

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 a specific verb and resource: 'Create a macro.' It further distinguishes itself from sibling tools by explaining the two macro types and explicitly adding 'Creating runs nothing,' which contrasts with execute-macro. This makes the tool's purpose unambiguous and separates it from related operations like list-macros and execute-macro.

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

Usage Guidelines3/5

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

Usage is implied: to create a macro, use this tool. The description does not explicitly name alternatives like execute-macro or list-macros, nor does it state when not to use it. The explanation of chat vs. script macros offers context but no direct routing to sibling tools, so guidance remains implicit.

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