Skip to main content
Glama

Predecessore Treno

predecessore_treno

Estimates the predecessor train on high-frequency shuttle or suburban lines to forecast delays for the next service before official alerts appear.

Instructions

Stima il treno 'predecessore' su una linea a spola/suburbana (stesso materiale rotabile che fa avanti e indietro, es. linee S): se il predecessore è in ritardo, è probabile che questo treno lo sarà anch'esso, prima ancora che il sito mandi un avviso. ATTENZIONE: è una stima per prossimità temporale (arrivo più recente alla stessa stazione, stesso operatore, stessa linea), non un dato certo dell'API. Funziona bene su linee a spola ad alta frequenza (verificato su S8 Lecco-Milano Porta Garibaldi e sulla Como/Chiasso-Milano Porta Garibaldi); NON è adatta a linee regionali a lunga percorrenza con poche corse al giorno (es. Milano Centrale-Tirano), dove restituirà null o un risultato poco significativo. Se codice_stazione_origine e data_partenza non vengono forniti, vengono determinati automaticamente tramite il numero di treno.

Input Schema

NameRequiredDescriptionDefault
numero_trenoYes
data_partenzaNo
finestra_minutiNo
codice_stazione_origineNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full burden well. It discloses that this is a proximity-based estimate rather than certain API data, describes the matching basis (most recent arrival, same station, same operator, same line), warns that unsuitable lines may return null, and explains automatic parameter resolution.

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?

The description is front-loaded with the core concept and then adds useful caveats and line-suitability examples. It is dense but most sentences earn their place; it could be tightened slightly but is not bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It covers purpose, usage limits, estimation caveats, null behavior, and auto-resolution of two optional parameters, and an output schema exists so return values need not be described. However, the lack of explanation for finestra_minuti and the required parameter leaves the invocation context incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must explain all four parameters, but it only clarifies that codice_stazione_origine and data_partenza are auto-determined when omitted. It says nothing about numero_treno requirements or finestra_minuti behavior/default, leaving significant parameter meaning undocumented.

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 states a specific action and resource: it estimates the predecessor train on shuttle/suburban lines, explaining the rolling-stock logic. It also distinguishes this estimate from certain API data, so an agent can tell what the tool is for without opening the 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?

It gives clear when-to-use and when-not-to-use guidance: good for high-frequency shuttle lines such as S8 and Como/Chiasso-Milano, not suitable for long-distance regional lines with few daily runs. It does not explicitly name a sibling tool to use instead when unsuitable, so it falls short of full alternative routing.

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