Skip to main content
Glama

dnd5e-item-activate

Activate an item with full Foundry automation — triggers Midi-QOL and other automation module hooks. Use for combat actions: melee/ranged attacks, spell casting, abilities. Pass targetTokenIds for attacks — Midi-QOL will auto-roll attack, check AC, roll damage, apply HP loss. For AoE spells pass templatePosition. Circle AoE (Fireball): x,y = center of effect (avg target positions). Cone/Line AoE (Cone of Cold, Lightning Bolt): x,y = caster token position, direction = angle toward targets (direction = atan2(targetY - casterY, targetX - casterX) * 180 / PI, add 360 if negative). Pixel coords: pixel = gridCoord * gridSize + gridSize / 2. Unlike dnd5e-item-use, this does NOT suppress hooks or dialogs, so automation modules work fully. Use scene-get to find target token IDs and grid info, item-list to find item IDs. Prefer this over dnd5e-item-use when targets, templates or automation matter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesItem ID to activate (from item-list)
actorIdYesActor ID performing the action
activityIdNoSpecific activity ID if item has multiple
spellLevelNoSpell slot level for casting. Enables upcasting (e.g. Fireball at 5th level = 10d6). Skips slot selection dialog. If omitted, uses spell base level.
activityTypeNoActivity type: "attack", "damage", "save", "heal", "check", "utility"
targetTokenIdsNoToken IDs of targets on the scene. Required for attacks — Midi-QOL needs targets to auto-resolve hits and damage
templatePositionNoAoE template placement. Circle spells: x,y = center of effect. Cone/line spells: x,y = caster position, direction = angle toward targets.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations are all false, so the description carries the full burden, and it delivers: it discloses that automation hooks run, dialogs are not suppressed, Midi-QOL auto-resolves attacks/AC/damage, and HP loss is applied. This goes well beyond annotations and warns about the observable side effects of activation.

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?

Every sentence adds distinct information and the most important purpose/contrast is front-loaded. The length is justified by the complex spatial/AoE instructions; nothing reads as 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 high-complexity combat tool with no output schema, the description covers purpose, prerequisites, coordinate math, target requirements, and sibling selection. An agent has enough to invoke it correctly and understand expected in-world effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so baseline is 3, but the description adds crucial usage semantics: targetTokenIds are required for attacks, templatePosition has different meanings for circle vs cone/line, and provides concrete formulas for direction and pixel coordinates. It also clarifies spellLevel upcasting with an example, which is not in the schema.

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?

Open with 'Activate an item with full Foundry automation' and immediately names Midi-QOL hooks, making the action and resource clear. It explicitly distinguishes itself from sibling dnd5e-item-use by noting that this version does not suppress hooks or dialogs. This is a specific verb+resource with clear differentiation.

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?

States when to use it: 'Use for combat actions' and 'Prefer this over dnd5e-item-use when targets, templates or automation matter.' It also names the alternative and gives the deciding condition, plus points to scene-get and item-list for prerequisites. No ambiguity remains about selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources