Skip to main content
Glama

roll_death_save

Roll a death saving throw for D&D 5e characters at 0 HP to determine if they stabilize or die, applying modifiers and roll modes while tracking successes and failures.

Instructions

Roll a death saving throw for a character at 0 HP. D&D 5e rules: 10+ success, 9- failure, nat 1 = 2 failures, nat 20 = revive at 1 HP. 3 successes = stable (unconscious but not dying), 3 failures = death. Supports modifiers from spells like Bless and roll modes (advantage/disadvantage). Returns ASCII-formatted death save result with visual tracker.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encounterIdYesThe encounter containing the dying character
characterIdYesThe character making the death save
modifierNoBonus/penalty to the roll (e.g., Bless spell gives +1d4)
rollModeNoRoll mode - advantage rolls 2d20 keep highest, disadvantage keeps lowestnormal
manualRollNoOverride the d20 roll (for testing)
manualRollsNoOverride both dice for advantage/disadvantage (for testing)

Implementation Reference

  • Registration of the 'roll_death_save' tool in the central tool registry. Defines name, description, input schema (converted from Zod rollDeathSaveSchema), and a wrapper handler that validates args and delegates to the rollDeathSave implementation function.
    roll_death_save: { name: 'roll_death_save', description: 'Roll a death saving throw for a character at 0 HP. D&D 5e rules: 10+ success, 9- failure, nat 1 = 2 failures, nat 20 = revive at 1 HP. 3 successes = stable (unconscious but not dying), 3 failures = death. Supports modifiers from spells like Bless and roll modes (advantage/disadvantage). Returns ASCII-formatted death save result with visual tracker.', inputSchema: toJsonSchema(rollDeathSaveSchema), handler: async (args) => { try { const validated = rollDeathSaveSchema.parse(args); const result = rollDeathSave(validated); return success(result); } catch (err) { if (err instanceof z.ZodError) { const messages = err.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', '); return error(`Validation failed: ${messages}`); } const message = err instanceof Error ? err.message : String(err); return error(message); } }, },
  • The MCP-compatible tool handler for roll_death_save. Performs Zod validation using rollDeathSaveSchema, calls the core rollDeathSave(validated) function, wraps result in success(), and handles validation/parsing errors.
    handler: async (args) => { try { const validated = rollDeathSaveSchema.parse(args); const result = rollDeathSave(validated); return success(result); } catch (err) { if (err instanceof z.ZodError) { const messages = err.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', '); return error(`Validation failed: ${messages}`); } const message = err instanceof Error ? err.message : String(err); return error(message); } },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mnehmos/ChatRPG'

If you have feedback or need assistance with the MCP directory API, please join our Discord server