Skip to main content
Glama

Initiative Manage

initiative_manage
Destructive

Manage combat initiative for a CozyVTT campaign: add or remove combatants, roll or set initiative values, reorder turns, and advance, start, or end combat.

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. 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

TableJSON 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

TableJSON 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

A5/5.0
Behavior5/5

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

Beyond the annotations, the description reveals important behaviors: actions may remove entries, clear state, reroll, or advance turns; the tool is not idempotent; dispatch returns a pending status rather than a business ACK; and errors may require reading events_poll. It also warns that older permission behavior is unverified and that the dice_roll queue does not throttle initiative rolls. This substantially exceeds what annotations alone provide.

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 long but densely packed with necessary information: purpose, routing, permissions, per-action requirements, async behavior, and error contracts. Every section earns its place, and the most important scoping statement is front-loaded. No filler or tautology is present.

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?

Given the tool's complexity—seven actions, async dispatch semantics, permission variations, system gating, and CoC7e specifics—the description covers all essential contexts. It explains return shapes, the need to poll events_poll, and how to interpret pending status. The output schema exists, and the description complements it by explaining business-level behavior rather than repeating structure.

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 the input schema already has 100% parameter coverage, the description adds a crucial action-to-parameter dependency matrix: add needs token_id/map_id, remove needs token_id, set needs token_id/map_id/value, reorder needs ordered_token_ids, and start/next/end need only action. It also clarifies that expression is a DM fallback rather than a guaranteed override, which is not obvious from the schema alone.

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: 'Modify campaign combatants, initiative values, order, or combat lifecycle.' It clearly distinguishes initiative_manage from initiative_read, which is the read-only counterpart, and lists the exact actions supported. An agent can immediately tell what this tool does and how it differs from siblings.

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?

The description provides explicit routing guidance: 'Use initiative_read for current state and events_poll for results/errors.' It also gives action-specific conditions, permission caveats, system gates for roll, and a CoC7e-specific recommendation to use add/start or set. This gives the agent clear when-to-use and when-not-to-use context.

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