Skip to main content
Glama
study-flamingo

D&D MCP Server

list_locations

Retrieve all campaign locations to manage your D&D world, track settings, and organize adventure sites.

Instructions

List all locations in the current campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function that lists all locations in the current campaign by retrieving the list from storage and formatting it nicely for display.
    @mcp.tool
    def list_locations() -> str:
        """List all locations in the current campaign."""
        locations = storage.list_locations()
        if not locations:
            return "No locations in the current campaign."
    
        loc_list = []
        for loc_name in locations:
            loc = storage.get_location(loc_name)
            if loc:
                loc_list.append(f"• {loc.name} ({loc.location_type})")
    
        return "**Locations:**\n" + "\n".join(loc_list)
  • Helper method in DnDStorage class that returns the names of all locations in the current campaign.
    def list_locations(self) -> list[str]:
        """List all location names."""
        if not self._current_campaign:
            return []
        return list(self._current_campaign.locations.keys())
Behavior2/5

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

With no annotations, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as whether this is a read-only operation, if it requires specific permissions, how results are formatted, or any limitations (e.g., pagination). The description is minimal and lacks context beyond the core purpose.

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, clear sentence with no wasted words. It's front-loaded with the essential action and resource, making it highly efficient and easy to parse for an AI agent.

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

Completeness3/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), the description is adequate but minimal. It states what the tool does but lacks context on usage, behavior, or output, which could be helpful since there are no annotations. It meets minimum viability but has clear gaps in guidance and transparency.

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?

There are 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, making a baseline score of 4 suitable as it avoids redundancy while matching the tool's simplicity.

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 ('locations'), specifying scope with 'in the current campaign'. It distinguishes from siblings like 'get_location' (singular) and 'create_location', but doesn't explicitly differentiate from other list tools like 'list_characters' or 'list_npcs' beyond resource type.

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?

No guidance on when to use this tool versus alternatives is provided. The description implies usage for listing all locations in a campaign, but doesn't mention prerequisites (e.g., needing a loaded campaign) or contrast with other tools like 'get_location' for specific details.

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