Skip to main content
Glama

ddb_roll_treasure

Read-only

Generate treasure rewards from D&D 2024 or 2014 tables by CR or monster list; roll hoards or individual rewards with automatic CR resolution.

Instructions

Generate a treasure reward using the 2024 XDMG treasure tables (default). Provide either a CR directly or a list of monster names — CR is resolved automatically by name (exact, then partial; official entries only — a name that matches nothing, several different creatures, or a creature with no known CR is reported rather than guessed). treasure_type 'hoard' makes one roll using the highest CR and includes magic items (requires character_level); 'individual' rolls once per monster and sums the results. Limits (rejected requests return an error, never silently truncated): at most 20 monster entries, at most 100 per entry, and at most 200 characters per monster name — these per-entry restrictions apply to hoard requests too, not just individual. 'individual' additionally caps the total rolls (sum of all entry counts) at 100. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. Only 2024 treasure tables exist: '2014' still rolls them and says so, but resolves monster CRs from 2014 stat blocks.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ddb_roll_treasure"
  }
}

Input Schema

NameRequiredDescriptionDefault
crNoChallenge rating (0–30). Use instead of monsters for a direct CR lookup.
monstersNoMonsters from the encounter. Highest CR determines the treasure tier for hoards. At most 20 entries; for treasure_type 'individual' the total count across all entries is capped at 100 rolls.
rules_editionNoRuleset: '2024' (default) or '2014'.2024
treasure_typeNoindividual = one roll per monster. hoard = one roll using the highest CR.hoard
character_levelNoCharacter level (1–20). Required for hoard treasure to determine which magic item table to use. If omitted, magic items are skipped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv3.0.0
    • changedInput schema / properties / monsters / description
      Previous value: -"Monsters from the encounter. Highest CR determines the treasure tier for hoards."New value: +"Monsters from the encounter. Highest CR determines the treasure tier for hoards. At most 20 entries; for treasure_type 'individual' the total count across all entries is capped at 100 rolls."
    • changedInput schema / properties / monsters / items / properties / count / description
      Previous value: -"Number of this monster (default 1)"New value: +"Number of this monster (default 1, max 100 per entry — applies to both individual and hoard)."
    • changedInput schema / properties / monsters / items / properties / count / maximum
      Previous value: -9007199254740991New value: +100
    • changedInput schema / properties / monsters / items / properties / name / description
      Previous value: -"Monster name — fuzzy matched, DDB with Open5e fallback"New value: +"Monster name — exact or partial match, DDB with Open5e fallback. Max 200 characters."
    • addedInput schema / properties / monsters / items / properties / name / maxLength
      Added value: +200
    • addedInput schema / properties / monsters / items / properties / name / minLength
      Added value: +1
    • addedInput schema / properties / monsters / maxItems
      Added value: +20
    • addedInput schema / properties / rules_edition
      Added value: +{
      +  "default": "2024",
      +  "description": "Ruleset: '2024' (default) or '2014'.",
      +  "enum": [
      +    "2014",
      +    "2024"
      +  ],
      +  "type": "string"
      +}
  2. First observedv2.10.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries most of the behavioral load, and it does so well: hard limits with the promise of errors rather than silent truncation, name-resolution fallback order (exact, then partial, official entries only), and explicit reporting of unresolvable names instead of guessing. The main gap is that it never describes the shape of the returned treasure output beyond the 'Rules:' line.

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?

Front-loading is correct — purpose, then input modes, then limits, then edition behavior. It is one long paragraph with some repetition around the per-entry limits ('these per-entry restrictions apply to hoard requests too, not just individual'), but every clause carries actionable information.

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?

With no output schema, the description must stand in for return-value expectations, and it only gestures at this via the 'Rules:' line and [tag] note. Everything else an agent needs to call it correctly — defaults, limits, resolution fallback, edition semantics — is present.

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?

Schema coverage is 100%, so the baseline is 3; the description still adds meaning the schema lacks, notably that omitting character_level silently skips magic items rather than erroring, and that hoard requests are subject to the same per-entry caps as individual. The cap restatements partially duplicate the schema's maxItems/maxLength, which keeps it from a 5.

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+resource ('Generate a treasure reward using the 2024 XDMG treasure tables') and immediately qualifies the default ruleset. It is unambiguous which sibling this replaces for treasure generation, and the alternate input modes (CR vs. monster list) are stated up front.

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?

It explicitly states the two mutually exclusive input paths ('Provide either a CR directly or a list of monster names'), explains the selection rule between treasure_type 'hoard' and 'individual', and notes character_level is required for hoard magic items. That is about as close to explicit when-to-use guidance as this tool allows.

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