Skip to main content
Glama

Add TfL journeys from a contactless statement

add_tfl_journeys
Idempotent

Adds TfL contactless journeys to the person’s Untap account, up to 500 rows per call, and checks everything they have saved for incomplete journeys, missed Hopper fares and other overcharges. Each row carries flags for an incomplete journey, a revenue-inspection maximum fare, a free Hopper fare, a TfL correction and the daily or weekly cap, as shown on the statement. Journeys already saved are skipped. Refunds follow the same rule as the TfL check: an incomplete journey without a destination is an upper limit equal to the whole charge, and one with intended_destination is an estimate. Requires sign-in to Untap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
journeysYesEvery journey on the statement. Up to 500 per call.
card_last4YesLast 4 digits of the contactless card, if shown.
period_endYesStatement period end date YYYY-MM-DD.
period_startYesStatement period start date YYYY-MM-DD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / journeys / items / properties / intended_destination
      Added value: +{
      +  "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."
      +}
    • changedInput schema / properties / journeys / items / properties / is_auto_corrected / description
      Previous value: -"OPTIONAL. True if the statement says TfL already auto-corrected this journey (e.g. \"Auto-completed\", \"Adjusted\")."New value: +"Optional. True when the statement says TfL has already corrected this journey (for example \"Auto-completed\" or \"Adjusted\")."
    • changedInput schema / properties / journeys / items / properties / is_daily_cap_hit / description
      Previous value: -"OPTIONAL. True if the statement explicitly marks this row as the daily-cap-reached entry."New value: +"Optional. True when the statement marks this row as the one where the daily cap was reached."
    • changedInput schema / properties / journeys / items / properties / is_hopper_free / description
      Previous value: -"OPTIONAL. True if the statement marks this fare as a free Hopper fare (second bus/tram tap within 60 min)."New value: +"Optional. True when the statement shows this fare as a free Hopper fare (a second bus or tram within 60 minutes)."
    • changedInput schema / properties / journeys / items / properties / is_weekly_cap_hit / description
      Previous value: -"OPTIONAL. True if the statement marks this row as a weekly-cap-reached entry."New value: +"Optional. True when the statement marks this row as the one where the weekly cap was reached."
    • changedInput schema / properties / journeys / items / properties / mode / description
      Previous value: -"Transport mode for this row. Use \"unknown\" only if the statement does not say."New value: +"Transport mode for this row, or \"unknown\" when the statement does not say."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare write (readOnlyHint=false), idempotentHint=true and destructiveHint=false; the description earns credit for the extra behavioural detail behind those flags — duplicate rows are skipped, up to 500 rows per call, and authentication is required. It stops short of describing failure/partial-import behaviour, so it is strong but not exhaustive.

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?

A single dense paragraph that front-loads the core action, then layers limits, flag semantics and refund rules in a logical order. Every sentence carries information, though the refund-rule sentence is intricate enough that it reads more like documentation than a quick scan.

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 4-param, fully-documented write tool with no output schema, the description covers the essentials: what is written, the batch ceiling, dedupe behaviour, auth and how refunds are computed. Only the outcome/response behaviour after a partial or rejected import is left unstated.

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 coverage is 100%, so the baseline would be 3, but the description goes further by naming the meaning of the per-row flags (revenue-inspection max fare, free Hopper fare, TfL correction, daily/weekly cap) and by restating the intended_destination refund rule as an estimate versus an upper limit. That is meaningful added interpretation, not a repeat of the schema.

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 ("Adds TfL contactless journeys to the person's Untap account"), which cleanly separates it from add_flight, add_train_journey and add_parking_fine. It also ties itself to the sibling check_tfl_journeys by referencing "the same rule as the TfL check", so the agent can place it in the family without opening a schema.

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 context of use is clear (ingesting statement rows, with journeys already saved being skipped and a 500-row-per-call ceiling), and the sign-in requirement is stated. It does not, however, explicitly tell the agent when to prefer this over, or run it alongside, check_tfl_journeys — the relationship is implied rather than spelled 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.