Skip to main content
Glama

dnd5e-item-activate

Activate an item with full Foundry automation (Midi-QOL hooks, targets, AoE templates): attacks, spells, abilities. targetTokenIds for attacks — Midi-QOL rolls attack and damage and applies HP. Module 8.14+: dialogs are skipped (fastForward) and answered by attackMode, ammunition, consume; cover, invisibility, prone and other one-off circumstances go in advantage/disadvantage, attackBonus, damageBonus, targetAcBonus — NOT as effects on the actor (an effect hits every copy of an unlinked token); several tokens of one actor: attackerTokenId. Status awaiting_user_dialog is not an error: a dialog opened on the GM's client and the use finishes when they click; do not repeat the call. appliedDamage/appliedHealing give HP per token; applied false = not applied (dnd5e-apply-damage does). AoE: templatePosition in pixels (gridCoord * gridSize + gridSize / 2). dnd5e-item-use is the quick use without targets.

Input Schema

NameRequiredDescriptionDefault
itemIdYesItem ID (from item-list)
actorIdYesActor ID
consumeNoWhat may be spent; omitted = the system decides
advantageNo
activityIdNoActivity ID if several
ammunitionNoAmmo item ID, or false = spend none
attackModeNooneHanded, twoHanded, offhand, thrown, thrown-offhand
spellLevelNoSpell slot level (upcasting); omitted = base level
attackBonusNoOne-off attack bonus: 2, "1d4"
damageBonusNoOne-off damage bonus: "1d6" (Sneak Attack)
fastForwardNoSkip dialogs and auto-roll (default true)
activityTypeNoActivity type: "attack", "damage", "save", "heal", "check", "utility"
disadvantageNo
targetAcBonusNoAdded to each target AC (cover); Midi-QOL only
targetTokenIdsNoToken IDs of the targets; required for attacks
attackerTokenIdNoAct as this token of the actor (several copies)
templatePositionNoAoE template: circle = effect center; cone/line = caster position + direction

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • changedInput schema / properties / activityId / description
      Previous value: -"Specific activity ID if item has multiple"New value: +"Activity ID if several"
    • changedInput schema / properties / actorId / description
      Previous value: -"Actor ID performing the action"New value: +"Actor ID"
    • addedInput schema / properties / advantage
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / ammunition
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "const": false,
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ammo item ID, or false = spend none"
      +}
    • addedInput schema / properties / attackBonus
      Added value: +{
      +  "description": "One-off attack bonus: 2, \"1d4\"",
      +  "type": [
      +    "number",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / attackMode
      Added value: +{
      +  "description": "oneHanded, twoHanded, offhand, thrown, thrown-offhand",
      +  "type": "string"
      +}
    • addedInput schema / properties / attackerTokenId
      Added value: +{
      +  "description": "Act as this token of the actor (several copies)",
      +  "type": "string"
      +}
    • addedInput schema / properties / consume
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What may be spent; omitted = the system decides",
      +  "properties": {
      +    "ammunition": {
      +      "type": "boolean"
      +    },
      +    "itemUses": {
      +      "type": "boolean"
      +    },
      +    "spellSlot": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / damageBonus
      Added value: +{
      +  "description": "One-off damage bonus: \"1d6\" (Sneak Attack)",
      +  "type": "string"
      +}
    • addedInput schema / properties / disadvantage
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / fastForward
      Added value: +{
      +  "description": "Skip dialogs and auto-roll (default true)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / itemId / description
      Previous value: -"Item ID to activate (from item-list)"New value: +"Item ID (from item-list)"
    • changedInput schema / properties / spellLevel / description
      Previous value: -"Spell slot level for casting. Enables upcasting (e.g. Fireball at 5th level = 10d6). Skips slot selection dialog. If omitted, uses spell base level."New value: +"Spell slot level (upcasting); omitted = base level"
    • addedInput schema / properties / targetAcBonus
      Added value: +{
      +  "description": "Added to each target AC (cover); Midi-QOL only",
      +  "type": "number"
      +}
    • changedInput schema / properties / targetTokenIds / description
      Previous value: -"Token IDs of targets on the scene. Required for attacks — Midi-QOL needs targets to auto-resolve hits and damage"New value: +"Token IDs of the targets; required for attacks"
    • changedInput schema / properties / templatePosition / description
      Previous value: -"AoE template placement. Circle spells: x,y = center of effect. Cone/line spells: x,y = caster position, direction = angle toward targets."New value: +"AoE template: circle = effect center; cone/line = caster position + direction"
    • changedInput schema / properties / templatePosition / properties / direction / description
      Previous value: -"Direction angle in degrees (0-360). 0=right, 90=down, 180=left, 270=up. Required for cone/line spells (Cone of Cold, Lightning Bolt). Not needed for circle AoE (Fireball)."New value: +"Degrees 0-360 (0=right, 90=down); cone/line only"
    • changedInput schema / properties / templatePosition / properties / x / description
      Previous value: -"X coordinate in pixels"New value: +"X in pixels"
    • changedInput schema / properties / templatePosition / properties / y / description
      Previous value: -"Y coordinate in pixels"New value: +"Y in pixels"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses critical runtime behavior: Midi-QOL rolls and applies HP, fastForward skips dialogs, awaiting_user_dialog is not an error and must not be retried, and appliedDamage/appliedHealing report per-token results. It also warns against modeling one-off circumstances as effects because effects hit every copy of an unlinked token. No contradiction with annotations; the description substantially enriches the behavioral picture.

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 text is dense but almost every clause carries operational value, and the core purpose is front-loaded before the edge-case guidance. It could be easier to scan if split into short bullets, but it is not padded or repetitive. Minor readability cost keeps it from a 5.

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 complex 17-parameter tool with no output schema, the description covers the important gaps: output semantics (appliedDamage/appliedHealing, applied false), dialog/status behavior, AoE coordinate conventions, target requirements, and the sibling alternative. Nothing essential for correct invocation appears to be missing.

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?

Although schema coverage is already high at 88%, the description adds cross-parameter meaning and pitfalls: targetTokenIds is for attacks, attackMode/ammunition/consume answer fastForwarded dialogs, attackerTokenId selects among multiple tokens, and templatePosition uses a pixel formula. It also clarifies how one-off modifiers should be supplied instead of effects. This is well beyond what the schema alone conveys.

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 opens with a specific verb and resource: 'Activate an item with full Foundry automation (Midi-QOL hooks, targets, AoE templates): attacks, spells, abilities.' It explicitly distinguishes this from the quick-use sibling by ending with 'dnd5e-item-use is the quick use without targets.' An agent can tell exactly what this tool does and when it differs from the simpler alternative.

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?

It gives explicit routing rules: use targetTokenIds for attacks, use dnd5e-apply-damage when applied is false, and use dnd5e-item-use for quick use without targets. It also explains how to encode one-off circumstances via advantage/disadvantage, attackBonus, damageBonus, and targetAcBonus rather than creating effects. This is about as strong as usage guidance gets.

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