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

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

Output Schema

TableJSON 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.
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. 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"
      +]
  2. 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"
      -]
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, covering the safety profile. The description adds beyond that by specifying the response contents and the upstream source of the ID, which helps the agent understand the tool's behavior without contradicting the 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 sentences with no filler; the first front-loads the action and purpose, and the second is a brief, necessary provenance note for the input ID. Every sentence earns its place.

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 single-parameter, read-only tool with an available output schema, the description fully covers what the agent needs: what the tool does, what it returns, and where the input ID originates. Nothing critical 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 description coverage is 100% and the parameter description already states the ID comes from onebusaway_get_arrivals under situations[].id or arrivals[].situationIds[]. The tool description repeats this same information, adding no new meaning beyond the schema, so the baseline score of 3 is appropriate.

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 opens with a specific verb and resource: 'Fetch full detail for a service alert (situation) by ID.' It then enumerates the returned fields (summary, description, reason, affected stops/routes, etc.), making it distinct from sibling tools that address routes, stops, or trips.

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 clear context by pointing out that situation IDs come from onebusaway_get_arrivals responses, which tells the agent exactly when to invoke this tool. It does not explicitly name exclusions or alternatives, but no competing sibling for alert details exists.

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.