Skip to main content
Glama

Character Hitdice Spend

character_hitdice_spend
Destructive

Spend one remaining Hit Dice use from a DND_5E character's pool to track short rest recovery. Check available uses with character_get, then select the pool entry by index; the action is pending until confirmed.

Instructions

Spend one remaining use from a DND_5E character's Hit Dice pool through WS. Use character_get to inspect pools first; dice_roll and token_hp_update perform rolling and healing separately, with no shared transaction. Upstream requires the character owner or DM and campaign assignment. index selects an array entry, not a dice count. Repeating spends again. Only the system is gated locally: there is no reliable capability probe, and older servers may silently ignore this event. 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
indexYesZero-based integer >=0 selecting an entry in sheet data.hitDice; inspect character_get for valid pools and remaining uses.
character_idYesCampaign-assigned DND_5E sheet ID whose Hit Dice pool is spent; not a map token ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this as destructive and non-idempotent, and the description reinforces this with 'Repeating spends again' and 'older servers may silently ignore this event.' It also discloses the asynchronous dispatch contract ('sent:true, confirmed:false, status:pending') and warns that dispatch is not a business ACK, adding substantial behavioral context beyond the annotations.

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 description is front-loaded with the primary action and usage guidance, and nearly every sentence earns its place given the destructive, async, non-idempotent nature of the tool. It is longer than average and contains a few dense caveats, but the length is justified by the operational risk and failure modes.

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 destructive, async, non-idempotent tool, the description covers prerequisites, return contract ({ok:true,data} vs {ok:false,error}), polling via events_poll, failure modes, and authorization requirements. Since an output schema exists, no additional return-value detail is needed.

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?

The input schema already documents both parameters comprehensively, so the baseline is 3. The description adds high-value disambiguation: index is 'an array entry, not a dice count' and character_id is a campaign-assigned sheet ID, 'not a map token ID', which meaningfully reduces common misuse.

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: 'Spend one remaining use from a DND_5E character's Hit Dice pool.' It also explicitly distinguishes this tool from character_get, dice_roll, and token_hp_update, so an agent can tell it apart from siblings without inspecting schemas.

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 gives explicit when-to-use and when-not-to-use guidance: use character_get first to inspect pools, use dice_roll and token_hp_update for rolling and healing separately, and read events_poll for results instead of blindly resending. It also states the prerequisite that the caller must be the character owner or DM with campaign assignment.

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