Skip to main content
Glama
open-transfer-times

open-transfer-times

Compare and rank flight connections

compare_connections
Read-onlyIdempotent

Rank multiple one-stop flight itineraries by connection risk using decision, transfer quality, ticket protection, confidence, and remaining margin to highlight risky transfers.

Instructions

Assess several one-stop itineraries (for example the results of a flight search) and rank them from safest to riskiest connection: by decision (recommend, caution, insufficient data, avoid), then transfer quality, then ticket protection (one ticket before unknown before self-transfer), then confidence, then remaining margin. Each option takes times or layover_minutes, like check_connection. Use the optional id to map results back to your own options (e.g. an offer id or price).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "options": "<options>"
    },
    "name": "compare_connections"
  }
}

Input Schema

NameRequiredDescriptionDefault
optionsYesTwo to twenty itineraries to compare

Output Schema

NameRequiredDescriptionDefault
rankedYes
disclaimerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.2.1
    • changedInput schema / properties / options / items / properties / arrival_time / pattern
      Previous value: -"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$"New value: +"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?(Z|[+-]\\d{2}:\\d{2})?$"
    • changedInput schema / properties / options / items / properties / baggage_recheck / description
      Previous value: -"Set true if checked bags must be collected and checked in again"New value: +"true if checked bags must be collected and checked in again, false if not (hand luggage only, or bags checked through). On separate tickets, leave it out only if unknown: the result then says whether it matters."
    • changedInput schema / properties / options / items / properties / departure_time / pattern
      Previous value: -"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$"New value: +"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?(Z|[+-]\\d{2}:\\d{2})?$"
    • addedOutput schema / properties / ranked / items / properties / assessment / properties / baggage_recheck
      Added value: +{
      +  "enum": [
      +    "required",
      +    "not_required",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranked / items / properties / assessment / properties / decision
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What to do with this connection. insufficient_data means key information is missing: ask the user rather than recommending it.",
      +  "properties": {
      +    "reasons": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "explanation": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "explanation"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "value": {
      +      "enum": [
      +        "recommend",
      +        "caution",
      +        "insufficient_data",
      +        "avoid"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "value",
      +    "reasons"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / ranked / items / properties / assessment / properties / if_baggage_recheck
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Separate tickets with unknown bags: the result if bags must be re-checked.",
      +  "properties": {
      +    "buffer_minutes": {
      +      "type": "number"
      +    },
      +    "quality": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "buffer_minutes",
      +    "quality"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / ranked / items / properties / assessment / properties / layover_basis
      Added value: +{
      +  "description": "How the layover length was computed: the airport's time zone, explicit UTC offsets, plain clock difference, or a given duration.",
      +  "enum": [
      +    "timezone",
      +    "offset",
      +    "wall_clock",
      +    "duration"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranked / items / properties / assessment / properties / wall_clock_layover_minutes
      Added value: +{
      +  "description": "Present when clocks change during the layover: what the local clocks show.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / ranked / items / properties / assessment / required
      Previous value: -[
      -  "route",
      -  "layover_source",
      -  "quality",
      -  "verdict",
      -  "layover_minutes",
      -  "transfer_process_minutes",
      -  "buffer_minutes",
      -  "steps",
      -  "factors",
      -  "confidence",
      -  "ticket",
      -  "connection_airport",
      -  "disclaimer"
      -]New value: +[
      +  "route",
      +  "layover_source",
      +  "decision",
      +  "layover_basis",
      +  "baggage_recheck",
      +  "quality",
      +  "verdict",
      +  "layover_minutes",
      +  "transfer_process_minutes",
      +  "buffer_minutes",
      +  "steps",
      +  "factors",
      +  "confidence",
      +  "ticket",
      +  "connection_airport",
      +  "disclaimer"
      +]
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), so the description's real contribution is disclosing the decision vocabulary (recommend, caution, insufficient data, avoid) and the tie-break sequence, which an agent needs to interpret rankings. It does not explain scoring thresholds, but the output schema likely carries those details.

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

Conciseness4/5

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

Two sentences, front-loaded with the action and followed by the ranking order with no filler. The long inline ordering chain is dense but earns its place because it defines the output semantics.

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 batch ranking tool with full annotations, a rich input schema, and an output schema, the description supplies what structured fields cannot: the ranking rationale and decision categories. Only the explicit relationship to check_connection as a fallback for single options is left implicit.

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%, so every parameter is already documented; the description only adds that id can be an offer id or price used to map results back, and echoes the times-or-layover_minutes rule. Useful but marginal above the baseline.

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 ('Assess several one-stop itineraries ... and rank them') and names the exact ordering criteria, which uniquely distinguishes it from the sibling check_connection that evaluates one option.

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 phrase 'for example the results of a flight search' and 'like check_connection' make the batch-versus-single-division clear by implication, but the description never explicitly says to use check_connection for a lone itinerary or names any exclusion.

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