Skip to main content
Glama

Get Real-Time Vehicle Positions

onebusaway_get_vehicles
Read-only

Real-time positions of all active vehicles for an agency. Optionally filter to a single route (client-side). Returns GPS coordinates, heading, schedule deviation, and current trip. Useful for "where are all the buses on route X right now?" Use agencyId values from onebusaway_list_agencies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
routeIdNoOptional agency-prefixed route ID to filter results to one route. Filtering is client-side — all agency vehicles are fetched first.
agencyIdYesAgency ID (e.g. "1" for Metro Transit, "40" for Sound Transit). Use onebusaway_list_agencies to discover IDs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of vehicles returned after any route filter.
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when no vehicles were found — e.g. the route may not be currently active, or the agency may not have real-time data.
routeIdNoRoute ID filter applied client-side, if any.
agencyIdNoAgency ID queried.
vehiclesNoActive vehicles for the agency, optionally filtered by route.
limitExceededNoTrue if the upstream capped the vehicle list — some vehicles were omitted. This endpoint has no pagination to retrieve them.

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description discloses that route filtering is client-side, meaning all agency vehicles are fetched before filtering, which is a performance-relevant behavior. It also enumerates returned fields (GPS coordinates, heading, schedule deviation, current trip), adding value beyond the bare annotation.

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?

Two concise sentences front-load the primary function and optional filter, then add a practical usage example. Every sentence contributes, and there is no filler or redundancy.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with two parameters (one required), both fully documented in the schema, and an existing output schema, the description covers the essential usage context. It includes the critical client-side behavior and points to agency discovery, leaving no meaningful gaps.

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% — both agencyId and routeId already have detailed descriptions, including the client-side filtering caveat. The tool description adds no new parameter semantics beyond what the schema captures; it only echoes the filter behavior and the agency-listing pointer. This meets the baseline for full schema 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 tool's core function: returning real-time positions of active vehicles for an agency, with an optional route filter. It is specific about the resource (vehicles) and the output (GPS coordinates, heading, schedule deviation, current trip), and it is easily distinguishable from sibling tools like get_arrivals or get_trip.

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

Usage Guidelines4/5

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

The description provides a concrete use case ('where are all the buses on route X right now?') and directs the agent to onebusaway_list_agencies for agency IDs. It does not explicitly enumerate when not to use this tool or name alternative tools, but the use-case framing gives clear context. Sibling names like get_arrivals imply alternatives without being called out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.2/5.0
Disambiguation5/5

Every tool targets a distinct operation: find_* for location-based search, search_* for text-based search, get_* for fetching by ID, list_* for enumeration, and get_arrivals for real-time vs get_schedule_for_* for scheduled data. Even similar pairs like find_routes/search_routes are clearly differentiated by their search mode.

Naming Consistency5/5

All tools follow a uniform `onebusaway_` prefix followed by a consistent verb pattern: find (location search), search (text search), get (retrieve by ID), list (enumerate), plus specific get_schedule_for_route/stop. Naming is entirely snake_case and logically structured.

Tool Count5/5

15 tools cover the full scope of a transit API without bloat: discovery (find/search), details (get), enumeration (list), real-time (arrivals/vehicles/trip), schedules, and alerts. Each tool serves a distinct purpose and fits within a typical well-scoped server.

Completeness5/5

The surface covers the primary travel workflows: finding routes/stops by location or name, retrieving full details, real-time arrivals/trip/vehicle tracking, scheduled departures for both routes and stops, service alerts, and agency enumeration. There are no obvious dead ends; each lookup provides IDs for follow-up queries.