Skip to main content
Glama

Check TfL journeys for overcharges

check_tfl_journeys
Read-onlyIdempotent

Checks Transport for London contactless or Oyster journeys for overcharges: incomplete journeys (no touch out, so the maximum fare was charged) and missed Hopper fares. Takes journey rows from a journey history, or the text of the CSV download from a TfL account. PDFs and images are not accepted. TfL refunds an incomplete journey as the maximum fare minus the fare for the journey actually made. Without the destination, the refund shown is an upper limit equal to the whole charge; with intended_destination on the row, it is an estimate from the usual fare to that station. Returns the refundable journeys and total, older journeys outside TfL’s 8 week window, how to claim in the TfL account, a claim pack and the details needed to save the journeys to an Untap account. It does not check service delays on the Tube, DLR, Elizabeth line or Overground, or Santander Cycles; the result lists these under not_checked. No sign-in needed. Nothing is saved to an account. A record of the check, with no name, account or IP address, is kept for a year so answers can be verified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csv_textNoThe text of the CSV journey history downloaded from a TfL account. Takes priority over journeys.
journeysNoJourney rows from a TfL contactless or Oyster journey history. Used when csv_text is not given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / csv_text / description
      Previous value: -"The text of the CSV file from the TfL account’s journey history download."New value: +"The text of the CSV journey history downloaded from a TfL account. Takes priority over journeys."
    • changedInput schema / properties / journeys / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "bus_route": {
      -          "description": "Bus route number for bus rows, otherwise null.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "date": {
      -          "description": "Journey date as YYYY-MM-DD.",
      -          "type": "string"
      -        },
      -        "end_time": {
      -          "description": "Tap-out time as HH:MM, or null.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "fare_pence": {
      -          "description": "Charge for this row in pence. £2.20 = 220.",
      -          "maximum": 100000,
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "from_location": {
      -          "description": "Tap-in station / stop name, or null if not shown.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "is_auto_corrected": {
      -          "description": "OPTIONAL. True if the statement says TfL already auto-corrected this journey (e.g. \"Auto-completed\", \"Adjusted\").",
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "is_daily_cap_hit": {
      -          "description": "OPTIONAL. True if the statement explicitly marks this row as the daily-cap-reached entry.",
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "is_hopper_free": {
      -          "description": "OPTIONAL. True if the statement marks this fare as a free Hopper fare (second bus/tram tap within 60 min).",
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "is_incomplete": {
      -          "description": "True if this journey has no tap-out recorded (e.g. label \"Incomplete\" or \"No exit\").",
      -          "type": "boolean"
      -        },
      -        "is_max_fare": {
      -          "description": "True if the statement labels this as a max-fare charge for a failed revenue inspection.",
      -          "type": "boolean"
      -        },
      -        "is_weekly_cap_hit": {
      -          "description": "OPTIONAL. True if the statement marks this row as a weekly-cap-reached entry.",
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "mode": {
      -          "description": "Transport mode for this row. Use \"unknown\" only if the statement does not say.",
      -          "enum": [
      -            "tube",
      -            "bus",
      -            "overground",
      -            "elizabeth",
      -            "dlr",
      -            "tram",
      -            "cable_car",
      -            "thameslink",
      -            "unknown"
      -          ],
      -          "type": "string"
      -        },
      -        "start_time": {
      -          "description": "Tap-in time as HH:MM, or null.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "to_location": {
      -          "description": "Tap-out station / stop name, or null for incomplete journeys.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "required": [
      -        "date",
      -        "start_time",
      -        "end_time",
      -        "mode",
      -        "from_location",
      -        "to_location",
      -        "bus_route",
      -        "fare_pence",
      -        "is_max_fare",
      -        "is_incomplete"
      -      ],
      -      "type": "object"
      -    },
      -    "maxItems": 500,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "bus_route": {
      +          "description": "Bus route number for bus rows, otherwise null.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "date": {
      +          "description": "Journey date as YYYY-MM-DD.",
      +          "type": "string"
      +        },
      +        "end_time": {
      +          "description": "Tap-out time as HH:MM, or null.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "fare_pence": {
      +          "description": "Charge for this row in pence. £2.20 = 220.",
      +          "maximum": 100000,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "from_location": {
      +          "description": "Tap-in station / stop name, or null if not shown.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "intended_destination": {
      +          "anyOf": [
      +            {
      +              "maxLength": 80,
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Optional, for an incomplete journey with no touch out: the station the person was travelling to. With it, the refund is estimated as the fare charged minus the usual fare to that station. Without it, the figure is an upper limit equal to the whole charge."
      +        },
      +        "is_auto_corrected": {
      +          "description": "Optional. True when the statement says TfL has already corrected this journey (for example \"Auto-completed\" or \"Adjusted\").",
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "is_daily_cap_hit": {
      +          "description": "Optional. True when the statement marks this row as the one where the daily cap was reached.",
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "is_hopper_free": {
      +          "description": "Optional. True when the statement shows this fare as a free Hopper fare (a second bus or tram within 60 minutes).",
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "is_incomplete": {
      +          "description": "True if this journey has no tap-out recorded (e.g. label \"Incomplete\" or \"No exit\").",
      +          "type": "boolean"
      +        },
      +        "is_max_fare": {
      +          "description": "True if the statement labels this as a max-fare charge for a failed revenue inspection.",
      +          "type": "boolean"
      +        },
      +        "is_weekly_cap_hit": {
      +          "description": "Optional. True when the statement marks this row as the one where the weekly cap was reached.",
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "mode": {
      +          "description": "Transport mode for this row, or \"unknown\" when the statement does not say.",
      +          "enum": [
      +            "tube",
      +            "bus",
      +            "overground",
      +            "elizabeth",
      +            "dlr",
      +            "tram",
      +            "cable_car",
      +            "thameslink",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        },
      +        "start_time": {
      +          "description": "Tap-in time as HH:MM, or null.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "to_location": {
      +          "description": "Tap-out station / stop name, or null for incomplete journeys.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "date",
      +        "start_time",
      +        "end_time",
      +        "mode",
      +        "from_location",
      +        "to_location",
      +        "bus_route",
      +        "fare_pence",
      +        "is_max_fare",
      +        "is_incomplete"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 500,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / journeys / description
      Previous value: -"Journey rows read from the person’s TfL journey history. Send these or csv_text, not both."New value: +"Journey rows from a TfL contactless or Oyster journey history. Used when csv_text is not given."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, but the description adds substantial context beyond them: the refund calculation logic (max fare minus actual fare), upper-limit vs estimate depending on intended_destination, the 8-week TfL window, and a year-long anonymised verification record. This is rich behavioral disclosure.

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?

Front-loaded with the core purpose, then layers inputs, refund logic, returns, exclusions and privacy. Every sentence carries real information, though the single dense paragraph is longer than strictly necessary.

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?

With no output schema, the description fully carries the return burden (refundable journeys, total, out-of-window journeys, claim pack, not_checked list) and annotates safety. For a 2-parameter, no-required-input tool, nothing an agent needs to call 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 description coverage is 100% — both csv_text priority and intended_destination's refund effect are already fully documented in the schema. The description restates these accurately but adds no syntax or semantics not already in the structured fields, so the 3 baseline 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 (checks) and resource (TfL contactless/Oyster journeys) with named overcharge classes — incomplete journeys and missed Hopper fares. It also distinguishes itself from siblings like add_tfl_journeys by scoping itself to checking rather than saving, and enumerates what it does not check.

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?

Gives clear input guidance: accepts journey rows or CSV text, rejects PDFs and images, and states 'no sign-in needed, nothing saved'. It doesn't explicitly route to sibling alternatives (e.g. add_tfl_journeys, check_commute), so it stops short of a full when/when-not with named alternatives.

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.