Skip to main content
Glama

Get Ticket Link

get_ticket_link
Read-only

Obtain a direct purchase link for SBB train tickets. The link opens in the SBB app with Halbtax or GA automatically selected. For family tickets, traveler names are needed with SwissTrip.

Instructions

Get a direct purchase link to buy a train ticket on SBB.ch. Only call this when the user wants to buy a specific ticket. On mobile with SBB app installed, opens directly in the app with Halbtax/GA applied automatically. Pass traveler_names for family tickets when connected to SwissTrip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trip_idYesTrip ID to purchase
from_nameYesOrigin station name (e.g. "Zürich HB")
from_idYesOrigin station ID (e.g. "8503000")
to_nameYesDestination station name (e.g. "Bern")
to_idYesDestination station ID (e.g. "8507000")
dateYesTravel date YYYY-MM-DD
timeYesDeparture time HH:MM
traveler_typeNoTraveler type (used when no traveler_names given)ADULT
reduction_cardNoSwiss reduction card (used when no traveler_names given)HALF_FARE
traveler_namesNoSwissTrip traveler names for family tickets. Requires SWISSTRIP_TOKEN.
Behavior4/5

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

Annotations indicate readOnlyHint=true and destructiveHint=false, which the description supports by stating it retrieves a purchase link. The description adds context on mobile app behavior (opens directly with Halbtax/GA) and the need for SWISSTRIP_TOKEN with traveler_names, going beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three well-structured sentences. The first sentence states core purpose, the second clarifies invocation context, and the third adds a special case. No redundant information.

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?

Given 10 parameters, no output schema, and annotations provide safety profile, the description covers key behaviors (purchase link retrieval, mobile app integration, SwissTrip requirement). It does not explicitly describe the return format (URL) but 'Get a direct purchase link' strongly implies it. Missing error handling info, but overall sufficient for selection and invocation.

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 description coverage is 100%, but the description adds meaningful nuance: 'Pass traveler_names for family tickets when connected to SwissTrip' and implies that reduction_card/traveler_type are defaults when traveler_names absent. This augments 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?

The description clearly states the tool's purpose: 'Get a direct purchase link to buy a train ticket on SBB.ch.' It uses a specific verb and resource, distinguishing it from siblings like get_prices or get_trip_details.

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?

Explicitly says 'Only call this when the user wants to buy a specific ticket.' Provides conditional guidance for mobile app use and when to pass traveler_names, though does not contrast with alternative sibling tools beyond this.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fabsbags/sbb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server