Skip to main content
Glama
study-flamingo

D&D MCP Server

list_characters

View all player and NPC characters in your current D&D campaign to manage your game roster and track character details.

Instructions

List all characters in the current campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'list_characters' tool. Decorated with @mcp.tool for registration. Lists all characters in the current campaign by fetching names from storage, retrieving details, and formatting a list.
    @mcp.tool
    def list_characters() -> str:
        """List all characters in the current campaign."""
        characters = storage.list_characters()
        if not characters:
            return "No characters in the current campaign."
    
        char_list = []
        for char_name in characters:
            char = storage.get_character(char_name)
            if char:
                char_list.append(f"• {char.name} (Level {char.character_class.level} {char.race.name} {char.character_class.name})")
    
        return "**Characters:**\n" + "\n".join(char_list)
  • Helper method in DnDStorage class that returns a list of character names from the current campaign's characters dictionary.
    def list_characters(self) -> list[str]:
        """List all character names in the current campaign."""
        if not self._current_campaign:
            return []
        return list(self._current_campaign.characters.keys())
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose behavioral traits such as pagination, sorting, filtering, rate limits, permissions required, or response format. For a list operation with zero annotation coverage, this is inadequate, though it correctly implies a read-only action.

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 directly states the tool's purpose without redundancy. It is front-loaded and wastes no words, making it highly concise and well-structured for its simple function.

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?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimal but incomplete. It lacks context on output (e.g., list format, fields), behavioral details, and usage guidelines, which are needed even for simple tools to ensure correct agent invocation.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds no parameter details, which is appropriate. Baseline is 4 for zero parameters, as the description doesn't need to compensate for any schema gaps.

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 action ('List') and resource ('characters'), specifying scope with 'in the current campaign'. It distinguishes from siblings like 'get_character' (single character) and 'list_campaigns' (different resource), though not explicitly. However, it lacks explicit sibling differentiation, preventing a perfect score.

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 minimal guidance, implying usage when listing characters in the current campaign, but offers no explicit when-to-use rules, alternatives (e.g., vs. 'get_character'), or exclusions. It doesn't address prerequisites like needing a loaded campaign, leaving gaps in usage context.

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/study-flamingo/gamemaster-mcp'

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