Skip to main content
Glama

ddb_search_classes

Read-only

Search D&D Beyond classes by name, source book, or rules edition (2024/2014), returning hit die and spellcasting data; fall back to Open5e SRD without a D&D Beyond login.

Instructions

Search all D&D Beyond classes with hit die and spellcasting. Requires login for D&D Beyond content (run ddb_login); without it, falls back to the Open5e SRD. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset.

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_search_classes"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoPartial class name (e.g. 'fighter', 'wizard')
limitNoMax results (default 30)
offsetNoSkip N results for pagination
sourceNoBook: slug (phb-2024), short name or title. Lists or picks that book's version, of either edition; wins over rules_edition. "homebrew" lists homebrew entries only.
rules_editionNoRuleset: '2024' (default) or '2014'.2024

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.0.0
    • addedInput schema / properties / rules_edition
      Added value: +{
      +  "default": "2024",
      +  "description": "Ruleset: '2024' (default) or '2014'.",
      +  "enum": [
      +    "2014",
      +    "2024"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "Book: slug (phb-2024), short name or title. Lists or picks that book's version, of either edition; wins over rules_edition. \"homebrew\" lists homebrew entries only.",
      +  "type": "string"
      +}
  2. First observedv2.10.2

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description complements that with the login-gated versus SRD-fallback behavior and the source-wins-over-rules_edition precedence rule. It does not disclose result-count behavior under fallback, caching, or what happens on a partial login failure, leaving meaningful behavioral gaps for a dual-backend tool.

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?

Four compact sentences, front-loaded with the capability then the access condition then the edition default, with no filler. The style is telegraphic and slightly dense ('A source lists one book's entries and wins over rules_edition'), but nothing is wasted.

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?

No output schema exists, and the description partially compensates by explaining that a 'Rules:' line or [tag] in the output names the ruleset. Combined with the auth/fallback and edition-default notes, an agent has enough to call it correctly, though the shape of returned class records is only hinted at.

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?

Schema description coverage is 100%, so all five parameters including the rules_edition enum and source precedence are already documented; the description largely restates the 2024 default and the source precedence. Baseline 3 applies because the structured schema carries the parameter semantics.

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?

States a specific verb and resource ('Search all D&D Beyond classes') plus the payload it returns ('hit die and spellcasting'), which no sibling class-feature or rules search tool claims. An agent can distinguish it from ddb_search_class_features and ddb_search_rules on the name-plus-description alone.

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?

Gives a concrete prerequisite path ('Requires login for D&D Beyond content (run ddb_login)'; otherwise falls back to the Open5e SRD), which tells the agent how to proceed when unauthenticated. It stops short of naming when to prefer a sibling tool over this one, so it is clear context without explicit alternatives.

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