Skip to main content
Glama
study-flamingo

D&D MCP Server

get_location

Retrieve detailed location information for Dungeons & Dragons campaigns by entering a location name to support world-building and adventure planning.

Instructions

Get location information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesLocation name

Implementation Reference

  • The @mcp.tool decorated handler function for the 'get_location' tool. Retrieves location data using storage.get_location and formats it into a detailed markdown string response.
    @mcp.tool
    def get_location(
        name: Annotated[str, Field(description="Location name")]
    ) -> str:
        """Get location information."""
        location = storage.get_location(name)
        if not location:
            return f"Location '{name}' not found."
    
        loc_info = f"""**{location.name}** ({location.location_type})
    
    **Description:** {location.description}
    
    **Population:** {location.population or 'Unknown'}
    **Government:** {location.government or 'Unknown'}
    
    **Notable Features:**
    {chr(10).join(['• ' + feature for feature in location.notable_features]) if location.notable_features else 'None listed'}
    
    **Notes:** {location.notes or 'No additional notes.'}
    """
    
        return loc_info
  • Supporting method in DnDStorage class that fetches the Location model instance by name from the current campaign's locations dictionary, used by the tool handler.
    def get_location(self, name: str) -> Location | None:
        """Get a location by name."""
        if not self._current_campaign:
            return None
        return self._current_campaign.locations.get(name)
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 states 'Get location information' but doesn't explain what information is returned, if it's read-only, requires permissions, or has side effects. For a tool with no annotation coverage, this is a significant gap in transparency.

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 sentence, 'Get location information.', which is extremely concise and front-loaded. However, it may be overly brief, bordering on under-specification, as it lacks necessary details for a tool with no annotations or output schema.

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 complexity of a tool that retrieves specific data, with no annotations and no output schema, the description is incomplete. It doesn't explain what 'location information' includes, how results are structured, or error conditions, leaving gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'name' documented as 'Location name'. The description doesn't add any meaning beyond this, such as format examples or constraints. Since the schema provides adequate coverage, the baseline score of 3 is appropriate.

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

Purpose2/5

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

The description 'Get location information' restates the tool name 'get_location' with minimal elaboration, making it tautological. It specifies the resource ('location') but lacks a clear verb beyond 'get' and doesn't differentiate from sibling tools like 'list_locations' or 'create_location', leaving the exact purpose vague.

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 is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, such as whether it retrieves a specific location by name versus listing all locations, which is handled by 'list_locations'. This absence leaves usage unclear.

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