Skip to main content
Glama

Period figures

period_stats
Read-onlyIdempotent

Retrieves period statistics for the London rail network or one line, covering watched coverage, good-service share, disruption counts, line-time lost, period comparisons, top causes and per-day bins.

Instructions

Figures for a period, for the network or one line: watched coverage, share of time with good service, unplanned and planned disruption counts, line-time disrupted, the change against the period before (when both were at least 80% watched), the most disrupted line, the longest unplanned disruption, the busiest day, the top causes, per-day (or per-week) bins and a per-line table. period names the period and gives prev and next: the end to pass for the period before or after. Unlike the other tools, times here (t0, t1, p0, starts and ends, bins, unwatched spans) are epoch seconds (UTC) as numbers; only period.first is ISO 8601.

Input Schema

NameRequiredDescriptionDefault
endNonow (the period ends now), or a London date YYYY-MM-DD the period ends with.now
lineNoOnly this line; omit for the network. A line id from list_lines, such as central, elizabeth, northern, dlr or weaver.
spanYesLength of the period: 1d, 7d, 30d, 90d or 365d.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior. The description adds meaningful context beyond that: times are epoch seconds here unlike other tools, change comparison requires both periods at least 80% watched, and results include per-day/per-week bins and a per-line table.

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 and metrics, then the time-unit caveat. It is dense and somewhat run-on, but every clause conveys useful information for a complex aggregate tool.

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?

With no output schema, the description carries the return-value burden and does so by enumerating the figures, bins, and per-line table. It also clarifies the unusual epoch-seconds convention and the 80% watched caveat, making it sufficiently complete for an agent to use the tool correctly.

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%, so the three parameters are already well documented. The description adds a useful note that the returned `period` object exposes `prev` and `next` ends to pass when walking adjacent periods, but it does not materially deepen the input parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states this returns period figures for the network or a single line, and enumerates the metrics in the result. It distinguishes itself from siblings mainly through bundling coverage/causes/disruptions into one aggregate and by the 'Unlike the other tools' time-format note, though it does not explicitly name which sibling to use instead.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: omit `line` for network-wide figures, supply `line` for one line, and use `end`/`span` to choose the period. However, there is no explicit guidance on when to prefer this over `coverage`, `causes`, `disruptions`, or `line_status`.

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