Skip to main content
Glama
carris-metropolitana-mcp

carris-metropolitana-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CARRIS_METROPOLITANA_BASE_URLNoSet this to point at a different API base URL (defaults to the official Carris Metropolitana open API at https://api.carrismetropolitana.pt/v2).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
find_stopsA

Find Carris Metropolitana bus stops by name and/or near a coordinate.

Use this first whenever the user names a place, street, station or gives a location, to get the stop_id needed by next_arrivals. Results include the lines serving each stop.

Args: query: Text to match in the stop name (accent/case-insensitive, all words must match), e.g. "Gare do Oriente", "Cacilhas terminal". A 6-digit stop id also works. lat, lon: A coordinate (WGS84). Results are sorted by straight-line distance from it. Note: buses inside Lisbon city are mostly run by Carris (a different company, not covered here); Carris Metropolitana serves the wider region. radius_m: Only stops within this many metres of lat/lon. Default 500 when no query is given; unlimited when a query is given. limit: Max stops to return (default 10, max 50).

next_arrivalsA

Upcoming buses at a Carris Metropolitana stop, real-time where available.

Use for "when is the next bus at X?" (get stop_id from find_stops first). Each arrival says whether it is "realtime" (live GPS estimate) or "scheduled" (timetable only: the bus may not have started its trip yet). minutes_from_now uses the real-time estimate when present. Times are Europe/Lisbon. Only today's operational day is covered, so late at night the list may be short or empty.

Args: stop_id: 6-digit stop id, e.g. "060361". line_id: Optional 4-digit line number to keep only that line, e.g. "2794". limit: Max arrivals to return (default 10, max 50).

line_infoA

Details of a Carris Metropolitana line: name, route ends, directions, municipalities.

Use for "where does line 4715 go?", "which bus goes from Cacilhas to Almada?", or to check whether a line passes a stop (include_stops=True). If line is not an exact line number it is treated as text (e.g. "Oriente Setubal") and the matching lines are listed instead. trips_today = 0 means the line does not run today (some lines are seasonal or weekday-only). Departure times past midnight are written "24:30", "25:10" (same service day).

Args: line: 4-digit line number ("4715") or free text matched against line names. include_stops: Also list every stop (id + name) in order for each direction.

service_alertsA

Service alerts (detours, works, strikes, stops not served) for Carris Metropolitana.

Use before recommending a trip, or when the user asks "is line X disrupted?". Filter by line and/or stop; with no filter, returns all current alerts (there are often ~100). Alerts are mostly published in Portuguese only.

Args: line_id: 4-digit line number, e.g. "4407". stop_id: 6-digit stop id, e.g. "160584". include_upcoming: Also return alerts that start in the future (default True). language: Preferred language ("pt" or "en"); falls back to what exists. limit: Max alerts to return (default 20, max 100).

vehicle_positionsA

Live GPS positions of the buses currently running on a Carris Metropolitana line.

Use for "where is the 3508 right now?" or to see how many buses are out on a line. Each vehicle includes its position, heading, speed, the stop it is at / heading to, and how many seconds old the fix is.

Args: line_id: 4-digit line number, e.g. "3508".

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.6/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a clearly distinct resource: stop discovery (find_stops), real-time arrivals (next_arrivals), line metadata (line_info), disruptions (service_alerts), and live vehicle tracking (vehicle_positions). The descriptions even prescribe the intended workflow (find_stops → next_arrivals), leaving almost no room for misselection.

Naming Consistency4/5

All names are snake_case, lowercase, and readable, with a mostly noun-phrase convention (line_info, service_alerts, vehicle_positions). Only find_stops is verb-led and next_arrivals is adjective-led, so the pattern isn't perfectly uniform, but it is predictable enough to navigate.

Tool Count5/5

Five tools is a tight, well-scoped surface for a transit data server, and each one covers a genuinely different query type. No tool feels redundant or like filler.

Completeness4/5

The surface covers the core lifecycle: locate a stop, get arrivals, inspect a line, check disruptions, and track vehicles. Gaps remain around journey planning between two points and timetables for future days (only today's operational day is covered), but these are documented limits rather than dead ends agents can't work around.

Maintenance

ActivityMaintained
ResponsivenessNo issues