Skip to main content
Glama

Plan a transit journey

plan_trip
Read-onlyIdempotent

Plan an origin-to-destination journey. Returns up to three independently validated itineraries (the fastest, then other lines); departure defaults to now. Pass the rider's place names as given: a name for one place (Penn Station, SFO) plans from or to all its stations. A name meaning different places (Broadway) returns the best trip from each, each labelled in reading and explained in notice: use the one the conversation points to, or ask the rider. The search covers every line of the coverage, buses included. When no itinerary is possible (planning unavailable, a search too large, or nothing found) it returns routeHints: lines near each end and direct lines serving both. Call again with routes (the lines you would ride, from routeHints or your own knowledge) to plan along only those lines, which works wherever schedules exist. Present only returned itineraries as confirmed. The whole journey must finish within windowSeconds (default two hours): if none is found for a long trip, retry with a larger window. Each transit leg carries a tripInstanceRef; pass it to get_vehicle_status to see where that train is now. For a wheelchair user or anyone avoiding stairs, set accessibility: "step_free": journeys then board, alight and change only at platforms step-free from the street per the agency (partial stations by direction), avoiding stations cut off by a current elevator outage; in-station changes between such platforms are taken as step-free. It refuses with ACCESSIBILITY_UNAVAILABLE when no current elevator report exists and ENDPOINT_NOT_STEP_FREE when an endpoint has no step-free platform now (get_service_status lists the outages). Never present a journey pieced together from get_departures as confirmed; check it here with routes.

Input Schema

NameRequiredDescriptionDefault
originYes
routesNoRoute refs (from find_transit) the journey may ride, e.g. the lines you would take: BART from SFO, then a Muni line. The server finds the actual trips, boarding stops, transfers and walks on only these routes and validates them. Works where full search is unavailable (SF Bay) and for buses.
coverageNoRegion: sfbay (San Francisco Bay Area), dc (Washington DC Metro and Metrobus), nyc (New York City Subway, LIRR and Metro-North). Region names such as SF or Washington DC also work. Pick the region the place is in; where optional, leave it out only if the place could be in several.
departAtNo
destinationYes
maxTransfersNo
accessibilityNostep_free: only platforms reachable without stairs, avoiding current elevator outages.no_preference
maxWalkMetresNoWalking allowed at each end and between rides; more than 800 is taken as 800.
windowSecondsNo

Output Schema

NameRequiredDescriptionDefault
asOfYes
noticeNoSet when a name means several places: which, and how the trips are labelled.
statusYes
reasonsYes
sourcesYes
routeHintsNoLines near each end. Pass the ones you would ride (in plan_trip.routes) to have their trips searched and validated.
attributionYes
itinerariesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / maxWalkMetres / description
      Added value: +"Walking allowed at each end and between rides; more than 800 is taken as 800."
    • removedInput schema / properties / maxWalkMetres / maximum
      Removed value: -800
  2. Changed2 schema fields changed
    • addedOutput schema / properties / itineraries / items / properties / reading
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "When a name means several places: the place this trip is from and to (null: as given).",
      +  "properties": {
      +    "destination": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "origin": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "required": [
      +    "origin",
      +    "destination"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Set when a name means several places: which, and how the trips are labelled.",
      +  "type": "string"
      +}
  3. Changed4 schema fields changed
    • changedInput schema / properties / coverage / description
      Previous value: -"Runtime coverage name or identifier; use find_transit to inspect availability."New value: +"Region: sfbay (San Francisco Bay Area), dc (Washington DC Metro and Metrobus), nyc (New York City Subway, LIRR and Metro-North). Region names such as SF or Washington DC also work. Pick the region the place is in; where optional, leave it out only if the place could be in several."
    • addedInput schema / properties / coverage / enum
      Added value: +[
      +  "sfbay",
      +  "SF",
      +  "San Francisco",
      +  "Bay Area",
      +  "dc",
      +  "DC",
      +  "Washington DC",
      +  "Washington, DC",
      +  "WMATA",
      +  "DC Metro",
      +  "Metrobus",
      +  "nyc",
      +  "NYC",
      +  "New York",
      +  "New York City",
      +  "NYC Subway",
      +  "MTA Subway",
      +  "MTA",
      +  "LIRR",
      +  "Long Island Rail Road",
      +  "Metro-North",
      +  "Metro-North Railroad"
      +]
    • removedInput schema / properties / coverage / maxLength
      Removed value: -256
    • removedInput schema / properties / coverage / minLength
      Removed value: -1
  4. Changed4 schema fields changed
    • addedInput schema / properties / routes
      Added value: +{
      +  "description": "Route refs (from find_transit) the journey may ride, e.g. the lines you would take: BART from SFO, then a Muni line. The server finds the actual trips, boarding stops, transfers and walks on only these routes and validates them. Works where full search is unavailable (SF Bay) and for buses.",
      +  "items": {
      +    "maxLength": 256,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 4,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedOutput schema / properties / itineraries / items / properties / steps
      Added value: +{
      +  "items": {
      +    "description": "fromName/toName null means the caller's own map point.",
      +    "oneOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "arrivalTime": {
      +            "format": "date-time",
      +            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +            "type": "string"
      +          },
      +          "departureTime": {
      +            "format": "date-time",
      +            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +            "type": "string"
      +          },
      +          "distanceMetres": {
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "fromName": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "kind": {
      +            "const": "walk",
      +            "type": "string"
      +          },
      +          "minutes": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "throughStation": {
      +            "description": "Includes walkways inside a station (published pathways).",
      +            "type": "boolean"
      +          },
      +          "toName": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "kind",
      +          "fromName",
      +          "toName",
      +          "departureTime",
      +          "arrivalTime",
      +          "distanceMetres",
      +          "minutes",
      +          "throughStation"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "arrivalTime": {
      +            "format": "date-time",
      +            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +            "type": "string"
      +          },
      +          "departureTime": {
      +            "format": "date-time",
      +            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +            "type": "string"
      +          },
      +          "fromName": {
      +            "type": "string"
      +          },
      +          "headsign": {
      +            "type": "string"
      +          },
      +          "intermediateStopCount": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "kind": {
      +            "const": "ride",
      +            "type": "string"
      +          },
      +          "mode": {
      +            "type": "string"
      +          },
      +          "routeName": {
      +            "type": "string"
      +          },
      +          "status": {
      +            "enum": [
      +              "realtime",
      +              "scheduled_only"
      +            ],
      +            "type": "string"
      +          },
      +          "toName": {
      +            "type": "string"
      +          },
      +          "tripInstanceRef": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "kind",
      +          "routeName",
      +          "headsign",
      +          "mode",
      +          "fromName",
      +          "toName",
      +          "departureTime",
      +          "arrivalTime",
      +          "status",
      +          "intermediateStopCount",
      +          "tripInstanceRef"
      +        ],
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / reasons / items / enum
      Previous value: -[
      -  "REALTIME_STALE",
      -  "REALTIME_UNAVAILABLE",
      -  "SCHEDULE_EXPIRED",
      -  "SCHEDULE_APPROXIMATE",
      -  "SCHEDULE_REALTIME_MISMATCH",
      -  "TRIP_CANCELED",
      -  "STOP_SKIPPED",
      -  "VALIDATOR_REJECTED",
      -  "COVERAGE_UNAVAILABLE",
      -  "SCOPE_LIMIT_EXCEEDED",
      -  "ACCESSIBILITY_UNAVAILABLE",
      -  "ENDPOINT_NOT_STEP_FREE"
      -]New value: +[
      +  "REALTIME_STALE",
      +  "REALTIME_UNAVAILABLE",
      +  "SCHEDULE_EXPIRED",
      +  "SCHEDULE_APPROXIMATE",
      +  "SCHEDULE_REALTIME_MISMATCH",
      +  "TRIP_CANCELED",
      +  "STOP_SKIPPED",
      +  "VALIDATOR_REJECTED",
      +  "COVERAGE_UNAVAILABLE",
      +  "SCOPE_LIMIT_EXCEEDED",
      +  "ACCESSIBILITY_UNAVAILABLE",
      +  "ENDPOINT_NOT_STEP_FREE",
      +  "PLANNING_UNAVAILABLE"
      +]
    • addedOutput schema / properties / routeHints
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Lines near each end. Pass the ones you would ride (in plan_trip.routes) to have their trips searched and validated.",
      +  "properties": {
      +    "destination": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "agencyRef": {
      +            "type": "string"
      +          },
      +          "mode": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "ref": {
      +            "type": "string"
      +          },
      +          "stopName": {
      +            "type": "string"
      +          },
      +          "stopRef": {
      +            "description": "The nearest stop the line serves.",
      +            "type": "string"
      +          },
      +          "walkMetres": {
      +            "minimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "ref",
      +          "name",
      +          "mode",
      +          "agencyRef",
      +          "stopRef",
      +          "stopName",
      +          "walkMetres"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "direct": {
      +      "description": "Lines serving stops near both ends: a one-seat ride may exist.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "agencyRef": {
      +            "type": "string"
      +          },
      +          "mode": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "ref": {
      +            "type": "string"
      +          },
      +          "stopName": {
      +            "type": "string"
      +          },
      +          "stopRef": {
      +            "description": "The nearest stop the line serves.",
      +            "type": "string"
      +          },
      +          "walkMetres": {
      +            "minimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "ref",
      +          "name",
      +          "mode",
      +          "agencyRef",
      +          "stopRef",
      +          "stopName",
      +          "walkMetres"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "origin": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "agencyRef": {
      +            "type": "string"
      +          },
      +          "mode": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "ref": {
      +            "type": "string"
      +          },
      +          "stopName": {
      +            "type": "string"
      +          },
      +          "stopRef": {
      +            "description": "The nearest stop the line serves.",
      +            "type": "string"
      +          },
      +          "walkMetres": {
      +            "minimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "ref",
      +          "name",
      +          "mode",
      +          "agencyRef",
      +          "stopRef",
      +          "stopName",
      +          "walkMetres"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "direct",
      +    "origin",
      +    "destination"
      +  ],
      +  "type": "object"
      +}
  5. Changed4 schema fields changed
    • addedInput schema / properties / accessibility / description
      Added value: +"step_free: only platforms reachable without stairs, avoiding current elevator outages."
    • changedOutput schema / properties / itineraries / items / properties / legs / items / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "agencyRef": {
      -        "type": "string"
      -      },
      -      "alightSequence": {
      -        "maximum": 9007199254740991,
      -        "minimum": -9007199254740991,
      -        "type": "integer"
      -      },
      -      "arrivalTime": {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -        "type": "string"
      -      },
      -      "boardSequence": {
      -        "maximum": 9007199254740991,
      -        "minimum": -9007199254740991,
      -        "type": "integer"
      -      },
      -      "continuation": {
      -        "type": "boolean"
      -      },
      -      "departureTime": {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -        "type": "string"
      -      },
      -      "directionId": {
      -        "anyOf": [
      -          {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "from": {
      -        "type": "string"
      -      },
      -      "headsign": {
      -        "type": "string"
      -      },
      -      "instanceStartSeconds": {
      -        "type": "number"
      -      },
      -      "intermediateStopCount": {
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "kind": {
      -        "const": "transit",
      -        "type": "string"
      -      },
      -      "mode": {
      -        "type": "string"
      -      },
      -      "realtimeTimestampSeconds": {
      -        "type": "number"
      -      },
      -      "routeRef": {
      -        "type": "string"
      -      },
      -      "scheduleVersion": {
      -        "type": "string"
      -      },
      -      "scheduledArrivalTime": {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -        "type": "string"
      -      },
      -      "scheduledDepartureTime": {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -        "type": "string"
      -      },
      -      "serviceDate": {
      -        "type": "string"
      -      },
      -      "sources": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "ageSeconds": {
      -              "anyOf": [
      -                {
      -                  "minimum": 0,
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "feedId": {
      -              "type": "string"
      -            },
      -            "ingestedAt": {
      -              "format": "date-time",
      -              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -              "type": "string"
      -            },
      -            "kind": {
      -              "enum": [
      -                "gtfs_schedule",
      -                "trip_updates",
      -                "vehicle_positions",
      -                "alerts",
      -                "native_api"
      -              ],
      -              "type": "string"
      -            },
      -            "producerTimestamp": {
      -              "anyOf": [
      -                {
      -                  "format": "date-time",
      -                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "scheduleVersion": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "feedId",
      -            "kind",
      -            "producerTimestamp",
      -            "ingestedAt",
      -            "ageSeconds",
      -            "scheduleVersion"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "status": {
      -        "enum": [
      -          "realtime",
      -          "scheduled_only"
      -        ],
      -        "type": "string"
      -      },
      -      "to": {
      -        "type": "string"
      -      },
      -      "transferRequired": {
      -        "type": "boolean"
      -      },
      -      "tripInstanceRef": {
      -        "type": "string"
      -      },
      -      "tripRef": {
      -        "type": "string"
      -      },
      -      "validatorOutcome": {
      -        "const": "valid",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "from",
      -      "to",
      -      "tripRef",
      -      "tripInstanceRef",
      -      "serviceDate",
      -      "instanceStartSeconds",
      -      "routeRef",
      -      "directionId",
      -      "headsign",
      -      "boardSequence",
      -      "alightSequence",
      -      "scheduleVersion",
      -      "scheduledDepartureTime",
      -      "scheduledArrivalTime",
      -      "departureTime",
      -      "arrivalTime",
      -      "status",
      -      "continuation",
      -      "mode",
      -      "agencyRef",
      -      "intermediateStopCount",
      -      "transferRequired",
      -      "sources",
      -      "validatorOutcome"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "arrivalTime": {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -        "type": "string"
      -      },
      -      "departureTime": {
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -        "type": "string"
      -      },
      -      "distanceMetres": {
      -        "type": "number"
      -      },
      -      "estimated": {
      -        "type": "boolean"
      -      },
      -      "from": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "latitude": {
      -                "maximum": 90,
      -                "minimum": -90,
      -                "type": "number"
      -              },
      -              "longitude": {
      -                "maximum": 180,
      -                "minimum": -180,
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "latitude",
      -              "longitude"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "kind": {
      -        "const": "walk",
      -        "type": "string"
      -      },
      -      "pathwayId": {
      -        "type": "string"
      -      },
      -      "to": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "latitude": {
      -                "maximum": 90,
      -                "minimum": -90,
      -                "type": "number"
      -              },
      -              "longitude": {
      -                "maximum": 180,
      -                "minimum": -180,
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "latitude",
      -              "longitude"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "validatorOutcome": {
      -        "const": "valid",
      -        "type": "string"
      -      },
      -      "verification": {
      -        "enum": [
      -          "pathway",
      -          "unverified"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "from",
      -      "to",
      -      "departureTime",
      -      "arrivalTime",
      -      "distanceMetres",
      -      "verification",
      -      "estimated",
      -      "validatorOutcome"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "agencyRef": {
      +        "type": "string"
      +      },
      +      "alightSequence": {
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "arrivalTime": {
      +        "format": "date-time",
      +        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +        "type": "string"
      +      },
      +      "boardSequence": {
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "continuation": {
      +        "type": "boolean"
      +      },
      +      "departureTime": {
      +        "format": "date-time",
      +        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +        "type": "string"
      +      },
      +      "directionId": {
      +        "anyOf": [
      +          {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "from": {
      +        "type": "string"
      +      },
      +      "headsign": {
      +        "type": "string"
      +      },
      +      "instanceStartSeconds": {
      +        "type": "number"
      +      },
      +      "intermediateStopCount": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "kind": {
      +        "const": "transit",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "type": "string"
      +      },
      +      "realtimeTimestampSeconds": {
      +        "type": "number"
      +      },
      +      "routeRef": {
      +        "type": "string"
      +      },
      +      "scheduleVersion": {
      +        "type": "string"
      +      },
      +      "scheduledArrivalTime": {
      +        "format": "date-time",
      +        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +        "type": "string"
      +      },
      +      "scheduledDepartureTime": {
      +        "format": "date-time",
      +        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +        "type": "string"
      +      },
      +      "serviceDate": {
      +        "type": "string"
      +      },
      +      "sources": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "ageSeconds": {
      +              "anyOf": [
      +                {
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "feedId": {
      +              "type": "string"
      +            },
      +            "ingestedAt": {
      +              "format": "date-time",
      +              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +              "type": "string"
      +            },
      +            "kind": {
      +              "enum": [
      +                "gtfs_schedule",
      +                "trip_updates",
      +                "vehicle_positions",
      +                "alerts",
      +                "equipment_outages",
      +                "native_api"
      +              ],
      +              "type": "string"
      +            },
      +            "producerTimestamp": {
      +              "anyOf": [
      +                {
      +                  "format": "date-time",
      +                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "scheduleVersion": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "feedId",
      +            "kind",
      +            "producerTimestamp",
      +            "ingestedAt",
      +            "ageSeconds",
      +            "scheduleVersion"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "status": {
      +        "enum": [
      +          "realtime",
      +          "scheduled_only"
      +        ],
      +        "type": "string"
      +      },
      +      "to": {
      +        "type": "string"
      +      },
      +      "transferRequired": {
      +        "type": "boolean"
      +      },
      +      "tripInstanceRef": {
      +        "type": "string"
      +      },
      +      "tripRef": {
      +        "type": "string"
      +      },
      +      "validatorOutcome": {
      +        "const": "valid",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "from",
      +      "to",
      +      "tripRef",
      +      "tripInstanceRef",
      +      "serviceDate",
      +      "instanceStartSeconds",
      +      "routeRef",
      +      "directionId",
      +      "headsign",
      +      "boardSequence",
      +      "alightSequence",
      +      "scheduleVersion",
      +      "scheduledDepartureTime",
      +      "scheduledArrivalTime",
      +      "departureTime",
      +      "arrivalTime",
      +      "status",
      +      "continuation",
      +      "mode",
      +      "agencyRef",
      +      "intermediateStopCount",
      +      "transferRequired",
      +      "sources",
      +      "validatorOutcome"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "arrivalTime": {
      +        "format": "date-time",
      +        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +        "type": "string"
      +      },
      +      "departureTime": {
      +        "format": "date-time",
      +        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +        "type": "string"
      +      },
      +      "distanceMetres": {
      +        "type": "number"
      +      },
      +      "estimated": {
      +        "type": "boolean"
      +      },
      +      "from": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "latitude": {
      +                "maximum": 90,
      +                "minimum": -90,
      +                "type": "number"
      +              },
      +              "longitude": {
      +                "maximum": 180,
      +                "minimum": -180,
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "latitude",
      +              "longitude"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "kind": {
      +        "const": "walk",
      +        "type": "string"
      +      },
      +      "pathwayId": {
      +        "type": "string"
      +      },
      +      "to": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "latitude": {
      +                "maximum": 90,
      +                "minimum": -90,
      +                "type": "number"
      +              },
      +              "longitude": {
      +                "maximum": 180,
      +                "minimum": -180,
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "latitude",
      +              "longitude"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "validatorOutcome": {
      +        "const": "valid",
      +        "type": "string"
      +      },
      +      "verification": {
      +        "enum": [
      +          "pathway",
      +          "unverified"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "from",
      +      "to",
      +      "departureTime",
      +      "arrivalTime",
      +      "distanceMetres",
      +      "verification",
      +      "estimated",
      +      "validatorOutcome"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedOutput schema / properties / reasons / items / enum
      Previous value: -[
      -  "REALTIME_STALE",
      -  "REALTIME_UNAVAILABLE",
      -  "SCHEDULE_EXPIRED",
      -  "SCHEDULE_APPROXIMATE",
      -  "SCHEDULE_REALTIME_MISMATCH",
      -  "TRIP_CANCELED",
      -  "STOP_SKIPPED",
      -  "VALIDATOR_REJECTED",
      -  "COVERAGE_UNAVAILABLE",
      -  "SCOPE_LIMIT_EXCEEDED"
      -]New value: +[
      +  "REALTIME_STALE",
      +  "REALTIME_UNAVAILABLE",
      +  "SCHEDULE_EXPIRED",
      +  "SCHEDULE_APPROXIMATE",
      +  "SCHEDULE_REALTIME_MISMATCH",
      +  "TRIP_CANCELED",
      +  "STOP_SKIPPED",
      +  "VALIDATOR_REJECTED",
      +  "COVERAGE_UNAVAILABLE",
      +  "SCOPE_LIMIT_EXCEEDED",
      +  "ACCESSIBILITY_UNAVAILABLE",
      +  "ENDPOINT_NOT_STEP_FREE"
      +]
    • changedOutput schema / properties / sources / items / properties / kind / enum
      Previous value: -[
      -  "gtfs_schedule",
      -  "trip_updates",
      -  "vehicle_positions",
      -  "alerts",
      -  "native_api"
      -]New value: +[
      +  "gtfs_schedule",
      +  "trip_updates",
      +  "vehicle_positions",
      +  "alerts",
      +  "equipment_outages",
      +  "native_api"
      +]
  6. Added

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety is covered. The description adds genuinely useful behavior beyond that: ambiguity handling for names like Broadway (best trip per place, explained in notice), routeHints fallback when no itinerary is possible, the ACCESSIBILITY_UNAVAILABLE and ENDPOINT_NOT_STEP_FREE refusal codes, and how step_free treats in-station changes. That is rich, but it is behavior of the domain rather than of the tool's own operation (latency, result ordering guarantees beyond 'fastest then other lines', or partial-failure semantics), hence a 3 rather than higher.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with purpose and the return shape before the caveats, and nearly every clause carries a rule an agent needs. But it arrives as one dense undivided block of roughly 350 words mixing routing, ambiguity, accessibility, error codes and cross-tool advice; headers or a shorter accessibility paragraph would make it far easier to apply under load.

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?

This is a complex 9-parameter, multi-region planner with an output schema, and the description still covers the things the schema cannot: which regions are searched, how ambiguous names are resolved, what routeHints means and how to act on it, and the exact refusal conditions. An agent has everything it needs to call this correctly and to interpret a failure.

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?

Schema description coverage is only 44% across 9 parameters, so the description has to compensate, and it does for the hard ones: origin/destination accept names resolving to multiple stations, routes takes lines 'from routeHints or your own knowledge', departAt defaults to now, windowSeconds defaults to two hours with a documented retry rule, and accessibility: step_free is spelled out far beyond the schema's one-liner. maxTransfers and maxWalkMetres are never mentioned, leaving a real gap.

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?

Opens with a specific verb+resource: plans an origin-to-destination transit journey and returns up to three validated itineraries. It draws explicit boundaries against siblings (get_departures must not be presented as confirmed, get_vehicle_status consumes tripInstanceRef, find_transit provides route refs), so an agent can tell exactly what this tool does that the others don't.

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

Usage Guidelines5/5

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

Gives concrete when-to-use rules: pass place names as given, call again with routes when full search is unavailable or when verifying a hand-built journey, retry with a larger windowSeconds when no long-trip itinerary is found, and set accessibility step_free for wheelchair users or stair-avoiders. It also names the anti-pattern (presenting get_departures output as confirmed) and the fix.

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.