Initiative Manage
initiative_manageManage 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
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | Manual initiative number required for set; null means unspecified. Other actions ignore it. | |
| action | Yes | One of add, remove, roll, set, reorder, start, next, end; case-insensitive. Determines required companion parameters. | |
| map_id | No | Map containing the token; required for add/roll/set, otherwise unused (empty default). | |
| token_id | No | Token to add/remove/roll/set; required for those actions. Empty default is appropriate for reorder/start/next/end. | |
| expression | No | Optional roll fallback for a DM when system derivation has no value; empty uses the server default. Ignored outside roll. | |
| character_name | No | Optional display label passed only for roll; empty omits it and does not affect permissions. | |
| ordered_token_ids | No | Nonempty ordered list of combatant token IDs for reorder; overrides value ordering. Null is appropriate for other actions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||