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);
      }
    },
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: the rules for success/failure (10+, 9-, nat 1/20), outcomes (stable at 3 successes, death at 3 failures), support for modifiers and roll modes, and the return format (ASCII-formatted result with visual tracker). This covers key operational aspects, though it could add more on error handling or side effects.

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 front-loaded with the core purpose and rules, followed by supporting details and return format, all in two dense but efficient sentences. Every part adds value—explaining mechanics, usage context, and output—without redundancy or fluff, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of D&D death saves, no annotations, and no output schema, the description does a strong job of covering behavior, rules, and return format. It could be more complete by detailing error cases (e.g., invalid character state) or the exact structure of the ASCII output, but it provides sufficient context for an agent to use the tool effectively in most scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so parameters are well-documented in the schema itself. The description adds some semantic context by mentioning 'modifiers from spells like Bless' and 'roll modes (advantage/disadvantage)', which aligns with the 'modifier' and 'rollMode' parameters, but does not provide significant additional meaning beyond what the schema already specifies. This meets the baseline for high schema coverage.

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 clearly states the specific action ('Roll a death saving throw') and the target ('for a character at 0 HP'), distinguishing it from sibling tools like 'roll_check' or 'roll_dice' by focusing on the specialized D&D 5e death save mechanics. It explicitly mentions the game rules and context, making the purpose unambiguous and distinct.

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?

The description provides clear context for when to use this tool: for characters at 0 HP in D&D 5e, with mentions of modifiers from spells like Bless and roll modes. However, it does not explicitly state when not to use it or name alternatives (e.g., vs. 'roll_check' for general ability checks), leaving some guidance implicit rather than explicit.

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

Install Server

Other Tools

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/mnehmos.chatrpg.game'

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