Skip to main content
Glama

Update combatant

update-combatant
DestructiveIdempotent

Update a combatant's initiative, visibility, or defeated status in the Foundry VTT combat tracker, preserving the active turn on reorder.

Instructions

Set the initiative of a combatant (null clears it), hide it from players in the tracker, or mark it defeated. The acting combatant keeps its turn when the order changes. defeated is only the tracker flag; toggle-token-condition sets a condition.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hiddenNoHidden from players in the combat tracker
tokenIdNoOr the id of its token
combatIdNoId of the combat encounter, as list-combats shows it. Without it the active encounter is used.
defeatedNoDefeated
initiativeNoNew initiative, or null to clear it
combatantIdNoId of the combatant

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A4.4/5.0
Behavior4/5

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

Beyond annotations, the description discloses that the acting combatant keeps its turn when the order changes and that defeated is only a tracker flag rather than a condition. These are valuable behavioral details not inferable from schema or annotations, with no contradiction to the provided 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?

Three tight sentences front-load the core operations, then provide the turn-order nuance and the condition-flag distinction. No filler or redundancy; every sentence contributes.

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?

Given six optional parameters and no output schema, the description covers the main update modes and the most important behavioral caveats. It leaves the combatantId-vs-tokenId identification and return value implicit, but the schema fully documents the identifiers and the annotations cover the safety profile, so it is reasonably complete for a targeted mutation tool.

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 description coverage is 100%, so the baseline is a 3. The description adds extra meaning by mapping the update modes to specific parameters and clarifying the defeated flag's semantics versus conditions, plus the null-clears-initiative behavior. This is modest added value beyond 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?

The description names a specific action set—set initiative, hide, or mark defeated—on a clear resource (combatant). It distinguishes itself from the sibling toggle-token-condition by clarifying that 'defeated' is only a tracker flag, and it implies a different scope from roll-initiative/change-combat-turn.

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?

It provides an explicit when-not by directing condition-setting to toggle-token-condition, and it explains the turn-order behavior when initiative changes. It does not explicitly name alternatives like roll-initiative or change-combat-turn for their respective cases, so guidance is clear but not exhaustive.

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