Skip to main content
Glama

create_character

Generate a complete D&D 5e character with customizable stats, class, race, equipment, and abilities for tabletop roleplaying games.

Instructions

Create a new D&D 5e character with stats, class, race, and equipment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
raceNoHuman
classNoFighter
levelNo
backgroundNo
characterTypeNopc
statsNo
hpNo
maxHpNo
acNo
speedNo
resistancesNo
immunitiesNo
vulnerabilitiesNo
conditionImmunitiesNo
spellcastingAbilityNo
knownSpellsNo
preparedSpellsNo
cantripsNo
skillProficienciesNo
saveProficienciesNo
equipmentNo
customClassNo
customRaceNo

Implementation Reference

  • The handler function for the 'create_character' tool. It parses the input arguments using createCharacterSchema, calls the createCharacter function with validated args, and returns a success response with the generated markdown or handles validation/runtime errors.
    handler: async (args) => {
      try {
        const validated = createCharacterSchema.parse(args);
        const result = createCharacter(validated);
        return success(result.markdown);
      } 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 registration entry for the 'create_character' tool in the toolRegistry, defining name, description, input schema (converted from Zod schema), and the handler function.
    create_character: {
      name: 'create_character',
      description: 'Create a new D&D 5e character with stats, class, race, and equipment',
      inputSchema: toJsonSchema(createCharacterSchema),
      handler: async (args) => {
        try {
          const validated = createCharacterSchema.parse(args);
          const result = createCharacter(validated);
          return success(result.markdown);
        } 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);
        }
      },
    },
  • Usage of createCharacterSchema for input validation within the handler. The schema itself is imported from './modules/characters.js'.
    const validated = createCharacterSchema.parse(args);
  • Call to the createCharacter helper function, which implements the core logic for creating a D&D 5e character and returns {markdown: string}.
    const result = createCharacter(validated);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a creation tool but doesn't mention whether this requires specific permissions, what happens on success/failure, whether the character becomes immediately available, or any system constraints. For a complex creation tool with 24 parameters, this is a significant gap.

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 a single, efficient sentence that front-loads the core purpose without unnecessary words. Every word earns its place by specifying the game system (D&D 5e) and key components.

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

Completeness2/5

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

For a complex character creation tool with 24 parameters, no annotations, no output schema, and 0% schema description coverage, the description is inadequate. It doesn't explain what the tool returns, how to handle the many optional parameters, or provide context about the creation process beyond the basic statement of purpose.

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

Parameters2/5

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

With 0% schema description coverage and 24 parameters (many complex nested objects), the description only mentions 'stats, class, race, and equipment' - covering just 4 of the 24 parameters. This provides minimal semantic context beyond the schema's structural definition, failing to compensate for the extensive coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Create' and resource 'new D&D 5e character' with specific components (stats, class, race, equipment). It distinguishes from obvious siblings like 'update_character' and 'delete_character' by specifying creation, though it doesn't explicitly differentiate from all possible alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'update_character' or 'get_character'. It mentions what the tool does but gives no context about prerequisites, appropriate scenarios, or when not to use it.

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/ChatRPG'

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