Skip to main content
Glama

Get Trip Status

onebusaway_get_trip
Read-only

Real-time status and stop sequence for a trip. Returns vehicle position, schedule deviation, current phase, and remaining stops. Use tripId from onebusaway_get_arrivals to look up a specific vehicle's progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tripIdYesTrip ID from an arrivals response or schedule lookup.
serviceDateMsNoService date as Unix milliseconds (midnight local time) — a non-negative integer. Only needed for trips from a previous service day. Omit to use today.
includeScheduleNoWhether to include the full stop sequence with times. Defaults to true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
statusNoReal-time status of the trip.
tripIdNoThe queried trip ID.
blockIdNoBlock ID grouping this trip with the others the same vehicle runs back-to-back. Pass to onebusaway_get_block for the full block schedule. Null when the trip has no block.
scheduleNoFull stop sequence with times, or null if includeSchedule=false.
situationsNoActive situation IDs affecting this trip.
tripHeadsignNoDestination sign text.
routeShortNameNoRoute short name (e.g. "44").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / serviceDateMs / description
      Previous value: -"Service date as Unix milliseconds (midnight local time). Only needed for trips from a previous service day. Omit to use today."New value: +"Service date as Unix milliseconds (midnight local time) — a non-negative integer. Only needed for trips from a previous service day. Omit to use today."
    • addedInput schema / properties / serviceDateMs / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / serviceDateMs / minimum
      Added value: +0
    • changedInput schema / properties / serviceDateMs / type
      Previous value: -"number"New value: +"integer"
  2. Changed10 schema fields changed
    • removedOutput schema / properties / blockId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / blockId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `trip_not_found`: Trip ID not found or not active for the service date. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `trip_not_found`: Trip ID not found or not active for the service date. `rate_limited`: No upstream request slot opened within the queue wait cap, or OneBusAway returned a rate limit response. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "trip_not_found"
      -]New value: +[
      +  "trip_not_found",
      +  "rate_limited"
      +]
    • removedOutput schema / properties / status / properties / closestStop / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / status / properties / closestStop / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / status / properties / nextStop / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / status / properties / nextStop / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / status / properties / vehicleId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / status / properties / vehicleId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "tripId",
      +      "routeShortName",
      +      "tripHeadsign",
      +      "blockId",
      +      "status",
      +      "schedule",
      +      "situations"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `trip_not_found`: Trip ID not found or not active for the service date. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "trip_not_found"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "tripId",
      -  "routeShortName",
      -  "tripHeadsign",
      -  "blockId",
      -  "status",
      -  "schedule",
      -  "situations"
      -]
  4. Changed2 schema fields changed
    • addedOutput schema / properties / blockId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Block ID grouping this trip with the others the same vehicle runs back-to-back. Pass to onebusaway_get_block for the full block schedule. Null when the trip has no block."
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "tripId",
      -  "routeShortName",
      -  "tripHeadsign",
      -  "status",
      -  "schedule",
      -  "situations"
      -]New value: +[
      +  "tripId",
      +  "routeShortName",
      +  "tripHeadsign",
      +  "blockId",
      +  "status",
      +  "schedule",
      +  "situations"
      +]
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already include readOnlyHint=true, which covers the read-only nature. The description adds that it returns real-time data and includes serviceDateMs for previous service day, a behavioral nuance. No contradictions.

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 two sentences, front-loads the main purpose and outputs, and the usage hint is concise. No unnecessary words.

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

Completeness4/5

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

For a read-only trip lookup with 3 parameters and an output schema, the description is fairly complete. It states the key outputs, the source of tripId, and the serviceDateMs caveat. It doesn't detail includeSchedule, but that is in the schema. Overall, it covers the essential information an agent needs to invoke 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%, so the baseline is 3. The description adds minimal extra semantics beyond the schema, such as reiterating that tripId comes from onebusaway_get_arrivals, which is already in the schema. It does not explain includeSchedule beyond what the schema says.

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 it retrieves real-time status and stop sequence for a trip, listing specific outputs (vehicle position, schedule deviation, current phase, remaining stops). It references the source of tripId from onebusaway_get_arrivals, which differentiates it from sibling tools like get_vehicles or get_arrivals.

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 usage hint: 'Use tripId from onebusaway_get_arrivals to look up a specific vehicle's progress,' indicating when to use it after obtaining a tripId. However, it doesn't explicitly state when not to use it or mention alternative tools for similar purposes, so it's not fully explicit.

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.