Skip to main content
Glama

list_characters

Retrieve and display all characters in your Dungeons & Dragons campaign to streamline character management and improve campaign organization.

Instructions

List all characters in the current campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'list_characters'. Retrieves character list from storage, fetches details for each, and formats a markdown list of characters with levels, races, and classes.
    @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 the list of character names (keys) 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())

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