Skip to main content
Glama

Initiative Manage

initiative_manage
Destructive

Manage campaign combat initiative by adding or removing combatants, rolling/setting/reordering values, and starting, advancing, or ending turns in CozyVTT.

Instructions

Modify campaign combatants, initiative values, order, or combat lifecycle. Use initiative_read for current state and events_poll for results/errors. Structural actions are DM-only; v1.4.0 also permits a controlling player to roll for an already added token before combat, subject to upstream checks. Older permission behavior is unverified. Actions may remove entries, clear state, reroll, or advance turns; the combined tool is not idempotent. add needs token_id/map_id; remove needs token_id; set needs token_id/map_id/value; reorder needs ordered_token_ids; start/next/end need only action. roll needs token_id and map_id and is gated to DND_5E/PATHFINDER_2E/SHADOWRUN_6E. The server derives system rolls; expression is a DM fallback, not a guaranteed override. CoC7e uses DEX ordering: use add/start or set. The dice_roll 2.1-second queue does not wrap initiative_manage; do not assume it throttles initiative rolls. On v1.5.0 caller-supplied characterName is ignored for initiative.roll; retain it for legacy behavior. Returns sent:true,confirmed:false,status:"pending" inside data: dispatch is not a business ACK. Read events_poll for results/system.error and inspect state before further action; never blindly resend. Returns {ok:true,data} on success; tool-body failures return {ok:false,error} with optional diagnostic data. Argument-schema errors are MCP errors.

Input Schema

NameRequiredDescriptionDefault
valueNoManual initiative number required for set; null means unspecified. Other actions ignore it.
actionYesOne of add, remove, roll, set, reorder, start, next, end; case-insensitive. Determines required companion parameters.
map_idNoMap containing the token; required for add/roll/set, otherwise unused (empty default).
token_idNoToken to add/remove/roll/set; required for those actions. Empty default is appropriate for reorder/start/next/end.
expressionNoOptional roll fallback for a DM when system derivation has no value; empty uses the server default. Ignored outside roll.
character_nameNoOptional display label passed only for roll; empty omits it and does not affect permissions.
ordered_token_idsNoNonempty ordered list of combatant token IDs for reorder; overrides value ordering. Null is appropriate for other actions.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.3.0
    • addedInput schema / properties / action / description
      Added value: +"One of add, remove, roll, set, reorder, start, next, end; case-insensitive. Determines required companion parameters."
    • addedInput schema / properties / character_name / description
      Added value: +"Optional display label passed only for roll; empty omits it and does not affect permissions."
    • addedInput schema / properties / expression / description
      Added value: +"Optional roll fallback for a DM when system derivation has no value; empty uses the server default. Ignored outside roll."
    • addedInput schema / properties / map_id / description
      Added value: +"Map containing the token; required for add/roll/set, otherwise unused (empty default)."
    • addedInput schema / properties / ordered_token_ids / description
      Added value: +"Nonempty ordered list of combatant token IDs for reorder; overrides value ordering. Null is appropriate for other actions."
    • addedInput schema / properties / token_id / description
      Added value: +"Token to add/remove/roll/set; required for those actions. Empty default is appropriate for reorder/start/next/end."
    • addedInput schema / properties / value / description
      Added value: +"Manual initiative number required for set; null means unspecified. Other actions ignore it."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this non-read-only, destructive, and non-idempotent, but the description adds substantial operational context: DM-only structural actions, v1.4.0 player-roll behavior, unverified legacy permissions, non-idempotent effects, and dispatch-pending semantics that are not a business ACK. It also explains the dice_roll queue exception and requires events_poll inspection before resending.

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 purpose is front-loaded, then details are grouped by usage, permissions, action parameters, and return behavior. It is dense and largely earns its length for a complex multi-action tool, though the return-value explanation partially overlaps the output schema and some version caveats could be tighter.

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 an eight-action, permission-sensitive combat tool with seven parameters, the description covers purpose, alternatives, action-parameter requirements, gating rules, version caveats, dispatch semantics, and error handling. An output schema exists for return shape, and the description still adds the important ACK/pending interpretation.

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?

With 100% schema coverage the baseline would be 3, but the description goes far beyond the schema by mapping required companion parameters per action, gating roll to specific systems, clarifying expression as a fallback rather than an override, and noting version-specific character_name behavior and CoC7e DEX ordering.

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 first sentence gives a specific verb and resource set: modify campaign combatants, initiative values, order, or combat lifecycle. It also names initiative_read and events_poll as alternatives, so an agent can distinguish it from sibling read/poll tools.

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 explicitly routes state reading to initiative_read and result/error checking to events_poll, and warns against blindly resending. It also gives permission context, but does not fully spell out when to choose between individual actions for a given player intent beyond the action-parameter mapping.

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