Skip to main content
Glama
belgrano9

SNCF MCP Server

by belgrano9

get_train_prices

Retrieve train prices for SNCF journeys by providing origin, destination, and departure time. Fetches available fare data.

Instructions

Get train prices (EXPERIMENTAL - Educational Proof of Concept).

⚠️ WARNING: This is an experimental feature that attempts to scrape prices from SNCF. It may not work due to:

  • Anti-scraping measures

  • API changes

  • Terms of Service restrictions

For production use, consider:

  • Lyko SNCF Connect API

  • Trainline API

  • Official SNCF partnerships

Args: origin: Origin station name (e.g., "Paris", "Lyon") destination: Destination station name (e.g., "Marseille") departure_datetime: Date/time in flexible formats (default: today) page: Page number for pagination (default: 1) per_page: Results per page (default: 5, max: 20)

Returns: Formatted string with price information (if available)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
originYes
per_pageNo
destinationYes
departure_datetimeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: it 'attempts to scrape prices' and may fail due to anti-scraping measures, API changes, or ToS restrictions. It also notes that returns are 'if available', setting accurate expectations. This is highly transparent.

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?

The description is well-structured with a front-loaded warning, a list of alternatives, an Args section, and a Returns section. Every sentence adds value, and the format is clear despite being slightly verbose due to the necessary experimental warnings.

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

Completeness5/5

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

For an experimental scraping tool, the description covers all necessary aspects: what it does, its limitations, all parameters, and the return format. It is self-contained and provides enough context for an agent to invoke it correctly, even without annotations.

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?

The description thoroughly explains every parameter with examples and defaults, compensating for 0% schema coverage. However, there is a minor inconsistency: departure_datetime is described as 'default: today' while the schema default is null, which could cause minor confusion.

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 purpose: 'Get train prices' with explicit scope ('from SNCF'). It distinguishes itself from sibling tools like 'search_trains' and 'find_station' by focusing on price retrieval, and adds context as an 'Educational Proof of Concept'.

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?

The description is explicit about when to use it (educational/testing) and explicitly warns against production use, offering concrete alternatives (Lyko SNCF Connect API, Trainline API, official SNCF partnerships). This provides clear when-to-use and when-not-to-use guidance.

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/belgrano9/sncf_mcp_server'

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