Skip to main content
Glama
mirodn

mcp-server-public-transport

no_nearest_stops

Find public transport stops near specific coordinates within a defined radius. Input latitude and longitude to locate nearby StopPlaces for trip planning.

Instructions

Find nearest StopPlaces for a coordinate (lat, lon) within a radius in meters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYes
lonYes
radiusNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main execution logic for the no_nearest_stops tool. Queries Entur GraphQL API for nearest StopPlaces given latitude, longitude, radius, and limit.
    async def no_nearest_stops(lat: float, lon: float, radius: int | None = 500, limit: int | None = 10) -> dict[str, object]:
        """
        Args:
            lat: Latitude.
            lon: Longitude.
            radius: Max distance in meters. Default: 500.
            limit: Max number of places to return. Default: 10.
        Returns:
            GraphQL `data` with nearest StopPlaces (distance + names + IDs).
        """
        query = """
        query Nearest($lat: Float!, $lon: Float!, $radius: Int!, $first: Int!) {
          nearest(
            latitude: $lat,
            longitude: $lon,
            maximumDistance: $radius,
            filterByPlaceTypes: [stopPlace],
            first: $first
          ) {
            edges {
              node {
                distance
                place {
                  ... on StopPlace { id name }
                }
              }
            }
          }
        }
        """
        variables = {
            "lat": float(lat),
            "lon": float(lon),
            "radius": int(radius or 500),
            "first": int(limit or 10),
        }
        logger.info(
            "Entur nearest stops: lat=%s lon=%s radius=%s first=%s",
            variables["lat"], variables["lon"], variables["radius"], variables["first"]
        )
        return await _post_graphql(query, variables)
  • tools/no.py:270-273 (registration)
    Registers the no_nearest_stops tool with the MCP framework, providing name and description used for tool schema.
    @mcp.tool(
        name="no_nearest_stops",
        description="Find nearest StopPlaces for a coordinate (lat, lon) within a radius in meters."
    )
  • server.py:52-52 (registration)
    Invokes the registration of Norwegian tools (including no_nearest_stops) on the main MCP server instance.
    no_tools = register_no_tools(mcp)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the core functionality but lacks details on permissions, rate limits, error handling, or response format. The description doesn't contradict annotations (none exist), but fails to provide sufficient behavioral context for safe and effective use.

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, efficient sentence that front-loads the core purpose without unnecessary words. Every element ('Find nearest StopPlaces', 'coordinate (lat, lon)', 'within a radius in meters') contributes directly to understanding the tool's function.

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 4 parameters with 0% schema coverage and no annotations, but with an output schema present, the description is moderately complete. It covers the basic purpose and key parameters but lacks behavioral details and parameter explanations. The output schema reduces the need to describe return values, but the description should do more to compensate for the sparse schema.

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 0%, so the description must compensate. It mentions parameters 'lat', 'lon', and 'radius' by context, but doesn't explain their semantics beyond the basic purpose. It omits 'limit' entirely. The description adds some value by clarifying the coordinate-based search, but doesn't fully compensate for the schema's lack of descriptions.

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 verb 'Find' and the resource 'nearest StopPlaces for a coordinate', specifying the action and target. It distinguishes from siblings like 'no_search_places' by focusing on proximity rather than general search, but doesn't explicitly contrast with 'ch_nearby_stations' which might serve a similar function in another context.

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 siblings like 'no_search_places' for broader searches or 'ch_nearby_stations' for similar functionality in a different region, leaving the agent to infer usage based on tool names alone.

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/mirodn/mcp-server-public-transport'

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