Skip to main content
Glama

get_campaign_info

Retrieve detailed data about the active Dungeons & Dragons campaign. Access campaign-specific information to streamline session planning and campaign management.

Instructions

Get information about the current campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `get_campaign_info` tool handler, decorated with `@mcp.tool` for registration. It fetches the current campaign from storage and returns formatted information including name, description, counts of entities, and game state 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()])

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