Skip to main content
Glama

get_locations

Retrieve all saved locations to manage your tasks by place.

Instructions

Get all saved locations.

Returns: List of locations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_locations async function that implements the tool logic. It calls rtm.locations.getList via the RTM client, parses the response, and returns locations (id, name, lat, lng, zoom, address).
    @mcp.tool()
    async def get_locations(ctx: Context) -> dict[str, Any]:
        """Get all saved locations.
    
        Returns:
            List of locations
        """
        from ..client import RTMClient
    
        client: RTMClient = await get_client()
    
        result = await client.call("rtm.locations.getList")
    
        locations_data = result.get("locations", {}).get("location", [])
        if isinstance(locations_data, dict):
            locations_data = [locations_data]
    
        locations = []
        for loc in locations_data:
            locations.append(
                {
                    "id": loc.get("id"),
                    "name": loc.get("name"),
                    "latitude": float(loc.get("latitude", 0)),
                    "longitude": float(loc.get("longitude", 0)),
                    "zoom": int(loc.get("zoom", 0)) if loc.get("zoom") else None,
                    "address": loc.get("address"),
                }
            )
    
        return build_response(
            data={
                "locations": locations,
                "count": len(locations),
            },
        )
  • Registration of all utility tools (including get_locations) via register_utility_tools(mcp, get_client).
    register_utility_tools(mcp, get_client)
  • The register_utility_tools function that decorates get_locations with @mcp.tool() to register it as an MCP tool.
    def register_utility_tools(mcp: Any, get_client: Any) -> None:
        """Register utility and diagnostic tools."""
    
        @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. It only states the return type ('List of locations') but lacks any behavioral details such as authentication requirements, pagination, or data recency. This is insufficient for a tool with no annotations.

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 extremely concise (two lines) and front-loaded with the action. Every word earns its place; no filler or redundancy.

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 simplicity (no parameters, output schema present), the description is minimally adequate. However, it could benefit from a brief sentence on the nature of 'locations' (e.g., user-created or system-defined) to enhance completeness.

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 zero parameters, so the baseline is 4. The description adds no parameter information, but none is needed as the schema covers everything (100% coverage).

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

Purpose5/5

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

The description clearly states the action and resource: 'Get all saved locations.' This is specific and distinguishes it from sibling tools like get_contacts or get_lists, which return different entity types. There is no ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. However, the tool name and sibling context imply it is used specifically for retrieving locations, not other entities. A higher score would require explicit context or exclusions.

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/ljadach/rtm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server