Skip to main content
Glama
study-flamingo

D&D MCP Server

get_campaign_info

Retrieve details about your current Dungeons & Dragons campaign, including characters, quests, locations, and session information for campaign management.

Instructions

Get information about the current campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_campaign_info' tool. Decorated with @mcp.tool for automatic registration. Retrieves the current campaign from storage, compiles key statistics, and returns a formatted markdown string with campaign details.
    @mcp.tool
    def get_campaign_info() -> str:
        """Get information about the current campaign."""
        campaign = storage.get_current_campaign()
        if not campaign:
            return "No active campaign."
    
        info = {
            "name": campaign.name,
            "description": campaign.description,
            "dm_name": campaign.dm_name,
            "setting": campaign.get_setting(),
            "character_count": len(campaign.characters),
            "npc_count": len(campaign.npcs),
            "location_count": len(campaign.locations),
            "quest_count": len(campaign.quests),
            "session_count": len(campaign.sessions),
            "current_session": campaign.game_state.current_session,
            "current_location": campaign.game_state.current_location,
            "party_level": campaign.game_state.party_level,
            "in_combat": campaign.game_state.in_combat
        }
    
        return f"**Campaign: {campaign.name}**\n\n" + \
               "\n".join([f"**{k.replace('_', ' ').title()}:** {v}" for k, v in info.items()])
  • The @mcp.tool decorator registers the get_campaign_info function as an MCP tool.
    @mcp.tool
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get information'), but doesn't specify what information is returned, whether it requires authentication, or if there are rate limits. This is inadequate for a tool with zero annotation coverage.

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?

The description is a single, efficient sentence with no wasted words. It's appropriately sized for a simple tool, though it could be more front-loaded with additional context if needed.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'information' includes (e.g., campaign details, state, metadata) or how it relates to other tools like 'get_game_state'. For a tool in a complex RPG server, this leaves significant gaps.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, earning a baseline score of 4 for this dimension.

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

Purpose3/5

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

The description states the tool's purpose as retrieving information about 'the current campaign', which is clear but vague. It specifies the verb 'Get' and resource 'campaign', but doesn't distinguish it from sibling tools like 'list_campaigns' or 'load_campaign' in terms of scope or detail level.

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. It doesn't mention prerequisites (e.g., needing a loaded campaign), exclusions, or comparisons to siblings like 'list_campaigns' (for listing multiple campaigns) or 'load_campaign' (for loading campaign data).

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