Skip to main content
Glama

Search Italian train journeys

search_train_journeys
Read-onlyIdempotent

Search one-way train journeys in Italy by origin, destination, and travel date; include adult and child passenger counts and paginate results when needed.

Instructions

TRAINS ONLY. Requires origin, destination, and date. When the user states passenger counts, always pass adults and children explicitly. Each price is the total for those passengers; never infer discounts or convert it to a per-person price. For stable pagination start with snapshot:true; continue using only searchId, offset and limit.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_train_journeys"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoToday or a future date in Europe/Rome, in YYYY-MM-DD format
limitNo
adultsNoNumber of adult passengers; pass explicitly when stated by the user
offsetNoResult offset; paginate by adding the previous limit when truncated is true
originNo
childrenNoNumber of child passengers; pass explicitly when stated by the user, including zero
providerNo
searchIdNo
snapshotNo
destinationNo

Output Schema

NameRequiredDescriptionDefault
totalYes
errorsYes
journeysYes
searchIdNo
createdAtNo
expiresAtNo
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.8
    • addedInput schema / properties / date / description
      Added value: +"Today or a future date in Europe/Rome, in YYYY-MM-DD format"
    • addedOutput schema / properties / journeys / items / properties / legs / items / properties / operator
      Added value: +{
      +  "enum": [
      +    "italo",
      +    "trenitalia"
      +  ],
      +  "type": "string"
      +}
  2. Changed13 schema fields changedv0.3.6
    • removedInput schema / properties / adults / default
      Removed value: -1
    • removedInput schema / properties / children / default
      Removed value: -0
    • addedInput schema / properties / searchId
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / snapshot
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "origin",
      -  "destination",
      -  "date"
      -]
    • addedOutput schema / properties / createdAt
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / errors / items / properties / code / enum
      Previous value: -[
      -  "INVALID_INPUT",
      -  "UNKNOWN_LOCATION",
      -  "NO_JOURNEYS",
      -  "PROVIDER_UNAVAILABLE",
      -  "INCOMPATIBLE_RESPONSE",
      -  "RATE_LIMITED",
      -  "AMBIGUOUS_LOCATION",
      -  "COVERAGE_UNAVAILABLE",
      -  "QUOTE_UNAVAILABLE",
      -  "LIVE_STATUS_UNAVAILABLE",
      -  "TRAIN_NOT_FOUND"
      -]New value: +[
      +  "SEARCH_EXPIRED",
      +  "SEARCH_TOO_LARGE",
      +  "INVALID_INPUT",
      +  "UNKNOWN_LOCATION",
      +  "NO_JOURNEYS",
      +  "PROVIDER_UNAVAILABLE",
      +  "INCOMPATIBLE_RESPONSE",
      +  "RATE_LIMITED",
      +  "AMBIGUOUS_LOCATION",
      +  "COVERAGE_UNAVAILABLE",
      +  "QUOTE_UNAVAILABLE",
      +  "LIVE_STATUS_UNAVAILABLE",
      +  "TRAIN_NOT_FOUND"
      +]
    • addedOutput schema / properties / expiresAt
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / journeys / items / properties / legs / items / properties / description
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / journeys / items / properties / legs / items / properties / includedInPrice
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / journeys / items / properties / legs / items / properties / transportMode
      Added value: +{
      +  "const": "urban_transfer",
      +  "type": "string"
      +}
    • addedOutput schema / properties / journeys / items / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / searchId
      Added value: +{
      +  "type": "string"
      +}
  3. Addedv0.3.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real behavior beyond that: prices are party totals (never per-person, never infer discounts) and pagination should continue with only searchId/offset/limit after a snapshot call. It also surfaces that origin, destination, and date are effectively required even though the schema marks nothing required — useful, though not flagged as a conflict.

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?

Four short sentences with the hard constraint (TRAINS ONLY) and the required inputs front-loaded; nothing is padding. The telegraphic style occasionally costs clarity ("never infer discounts" has no stated reason), but information density is high.

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?

An output schema exists, so return shape needn't be explained, and the pricing note already frames how to read fares. For a 10-parameter tool with 40% coverage, however, the provider selector and the relationship between snapshot/searchId and offset/limit are only partially covered.

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?

At 40% schema coverage the description compensates for some gaps: required inputs, explicit adults/children (including children=0), and the snapshot→searchId pagination flow. But provider (trenitalia/italo) is never mentioned, and origin/destination formats are undocumented in both places, leaving a meaningful hole.

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?

"TRAINS ONLY" plus the required origin/destination/date scope make it clear this searches rail journeys and separates it from the broader sibling search_journeys. The description never states the verb+resource directly, relying on the name/title for that, but the delimitation is specific enough for selection.

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?

It gives operational when-guidance: pass passenger counts explicitly when the user states them, and use snapshot:true first for stable pagination. It does not say when to choose this over search_journeys, get_station_board, or the provider-listing tools, so the sibling routing is left implied.

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