Skip to main content
Glama

Show journey options (interactive)

mostrar_horarios
Read-only

Search Portuguese train journeys and display interactive cards with buy buttons so users can compare options and choose which ticket to purchase.

Instructions

Same search as horarios, but also shows the options to the user as interactive cards in the chat, each with a buy button. Use it only when the user wants to see and compare trains to pick one, or wants to buy. Do NOT use it for quick factual questions (next train, a price, a single time), for checks you make for yourself, or when you will answer in one sentence; use horarios for those. Do not call both for the same search.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "mostrar_horarios"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesDestination station: name or CP code
dateNoTravel date YYYY-MM-DD (Europe/Lisbon). Default: today
fromYesOrigin station: name (fuzzy, accents optional) or CP code like 94-30007
langNoLanguage for names and messagesPT
afterNoEarliest departure HH:MM
beforeNoLatest departure HH:MM
servicesNoKeep only journeys whose every leg uses one of these service codes. Valid codes could not be loaded at startup; they are checked against CP at call time.
passengersNoNumber of adults
direct_onlyNoOnly journeys without transfers
return_dateNoOptional return date YYYY-MM-DD
travel_classNo1 = 1st/Conforto, 2 = 2nd/Turística

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds the crucial non-obvious behavior: results are pushed to the chat as interactive cards with a buy button, i.e. a user-visible rendering side effect that the annotations do not capture. It does not mention latency, pagination, or limits on how many journeys get carded, so it stops short of full 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-loads the key differentiator (cards with buy button) before the usage rules, and every clause is actionable. The negative-condition list is slightly long and repeats the 'don't answer quickly with this' idea in several forms, which is why it is not a 5.

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 an 11-parameter, no-output-schema tool, the definition explains the one thing the schema cannot: what the user sees (comparison cards plus buy button). Coordination with the horarios sibling is fully covered; only minor details like result count or card behavior on error are absent.

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%, with every parameter (date, after/before, services, passengers, direct_only, return_date, travel_class) documented inline, so the schema carries parameter meaning. The description adds no new parameter semantics such as how card count or travel_class interacts with the rendered cards.

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 behavior: the same journey search as horarios, but rendered to the user as interactive cards each with a buy button. This distinguishes it from the sibling horarios in a single clause an agent can act on without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit positive conditions (user wants to see and compare trains, or wants to buy) and explicit negative conditions (quick factual questions, internal checks, one-sentence answers), names the alternative horarios, and forbids calling both for the same search.

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