Skip to main content
Glama

Get Service Alert Detail

onebusaway_get_alert
Read-only

Fetch full detail for a service alert (situation) by ID. Returns the summary, description, reason (e.g. detour, construction), affected stops and routes, consequence description, and active time windows. Situation IDs appear in onebusaway_get_arrivals responses under situationIds and situations[].id.

Input Schema

NameRequiredDescriptionDefault
situationIdYesSituation/alert ID from onebusaway_get_arrivals (situations[].id or arrivals[].situationIds[]).

Output Schema

NameRequiredDescriptionDefault
idNoSituation ID.
urlNoURL for more information about this alert, or null.
errorNoPresent when the call failed. Absent on success.
reasonNoReason code from TPEG: equipmentReason, environmentReason, personnelReason, miscellaneousReason, securityAlert. Null when not provided.
affectsNoStops, routes, trips, or agencies affected by this alert.
summaryNoShort summary of the service alert.
severityNoSeverity level as reported by the agency, or null.
timezoneNoValidated IANA timezone shared by every affected scope, or UTC when unresolved, invalid, absent, or conflicting.
descriptionNoLonger description of the alert, or null.
consequencesNoOperational consequences of this alert.
activeWindowsNoTime windows when this alert is active.
consequenceMessageNoHuman-readable consequence description (e.g. "Detour in effect"), or null.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "id",
      -      "summary",
      -      "description",
      -      "reason",
      -      "severity",
      -      "consequenceMessage",
      -      "affects",
      -      "consequences",
      -      "activeWindows",
      -      "url"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "timezone",
      +      "id",
      +      "summary",
      +      "description",
      +      "reason",
      +      "severity",
      +      "consequenceMessage",
      +      "affects",
      +      "consequences",
      +      "activeWindows",
      +      "url"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / timezone
      Added value: +{
      +  "description": "Validated IANA timezone shared by every affected scope, or UTC when unresolved, invalid, absent, or conflicting.",
      +  "type": "string"
      +}
  2. Changed12 schema fields changed
    • removedOutput schema / properties / consequenceMessage / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / consequenceMessage / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / description / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `situation_not_found`: Situation ID does not exist on this instance. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `situation_not_found`: Situation ID does not exist on this instance. `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: -[
      -  "situation_not_found"
      -]New value: +[
      +  "situation_not_found",
      +  "rate_limited"
      +]
    • removedOutput schema / properties / reason / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / reason / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / severity / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / severity / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / url / 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": [
      +      "id",
      +      "summary",
      +      "description",
      +      "reason",
      +      "severity",
      +      "consequenceMessage",
      +      "affects",
      +      "consequences",
      +      "activeWindows",
      +      "url"
      +    ]
      +  },
      +  {
      +    "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: `situation_not_found`: Situation ID does not exist on this instance. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "situation_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: -[
      -  "id",
      -  "summary",
      -  "description",
      -  "reason",
      -  "severity",
      -  "consequenceMessage",
      -  "affects",
      -  "consequences",
      -  "activeWindows",
      -  "url"
      -]
  4. Added

TDQS

A4.1/5.0
Behavior3/5

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

readOnlyHint=true already establishes the safety profile, and the description adds that the result carries reason, consequences, affected stops/routes and active time windows. However, this largely restates what the output schema already defines, and it says nothing about behavior for an unknown/expired ID or whether the alert can be returned outside its active window.

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 sentences, both earning their place: the first gives purpose and payload, the second gives ID provenance. Purpose is front-loaded and there is no filler.

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 one-parameter, read-only lookup with an output schema, the description covers what it does, how to obtain the required ID, and what the response conceptually contains. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100% and the single parameter's description already names both source paths (situations[].id and arrivals[].situationIds[]). The description's provenance note repeats that schema text rather than adding format or validity constraints, so the baseline 3 applies.

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?

States a specific verb and resource ('Fetch full detail for a service alert (situation) by ID') and enumerates what the detail contains, making it unambiguous that this is a single-record lookup rather than a search or list. The mention that IDs come from get_arrivals positions it clearly against the sibling that surfaces them.

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?

Tells the agent exactly where a valid situationId originates ('situationIds and situations[].id' in onebusaway_get_arrivals responses), which is the main usage decision for this tool. No explicit when-not-use or sibling exclusion is stated, but for a leaf ID-lookup there is little alternative to rule 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.