Skip to main content
Glama
fastf1-mcp-server

fastf1-mcp-server

by Surya96t

get_replay_state

Retrieve a live snapshot of an F1 race replay, including lap, leader, track status, safety car, weather, leaderboard, and race-control messages for in-play questions.

Instructions

Snapshot of a race currently playing in f1-race-replay: replay time, lap, leader, track status, safety car, weather, the live leaderboard (position, tyre, tyre age, speed, gear, DRS, pit, last lap, gaps) and the latest race-control messages.

Data source: f1-race-replay telemetry stream (localhost:9999)

Use when the user is watching a replay and asks "who's leading now", "what tyres are they on", "is there a safety car", or wants live commentary. The replay must be running and un-paused.

Args: top_n: Number of leaderboard rows to return (default 20)

Returns: { "replayTime": "00:41:12", "lap": 23, "totalLaps": 57, "leader": "VER", "trackStatus": "SC", "safetyCar": "on_track", "playbackSpeed": 4.0, "paused": false, "progressPct": 40.2, "weather": {"airTempC": 24.1, "trackTempC": 38.0, "rain": "DRY"}, "leaderboard": [ {"position": 1, "driver": "VER", "lap": 23, "tyre": "HARD", "tyreLife": 9, "speedKph": 182.0, "gear": 5, "drsOpen": false, "inPit": false, "lastLapSec": 95.12, "gapToLeaderSec": 0.0, "intervalSec": null}, ... ], "recentRaceControl": [{"replayTimeSec": 2401.2, "category": "SafetyCar", "message": "SAFETY CAR DEPLOYED"}, ...] }

Note: Positions come from the replay's own running order, which can be briefly wrong near the start/finish line or during pit stops (a known limitation of f1-race-replay). Gaps are from the last completed lap.

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": "get_replay_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
top_nNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the localhost:9999 telemetry source, the precondition that playback must be active, that gaps come from the last completed lap, and a known accuracy limitation (running order briefly wrong at the start/finish line or during pit stops). It does not say what is returned or thrown when the replay is not running, which is the remaining behavioral gap.

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

Conciseness3/5

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

The purpose and usage notes are front-loaded and efficient, but the lengthy Args/Returns block largely restates the structure already carried by the output schema, adding several lines of low-value duplication. Well organized, but not every section earns its place.

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 a single-parameter live-snapshot tool with an output schema present, the definition covers source, precondition, expected use, and data-quality caveats — everything an agent needs to decide to call it and interpret the result. Nothing material is missing.

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 coverage is 0% and the schema only shows an untyped-looking integer with default 20, so the description's "top_n: Number of leaderboard rows to return (default 20)" is the sole source of meaning, which it supplies clearly. It omits any bound or behavior when top_n exceeds the field size, keeping it from a 5.

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 names a specific verb and resource ("snapshot of a race currently playing in f1-race-replay") and enumerates exactly what the snapshot contains: replay time, lap, leader, track status, safety car, weather, leaderboard fields, and race-control messages. This clearly separates it from static/historical siblings such as get_race_results_historical, get_lap_times, or get_race_control_messages.

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 concrete use cases ("who's leading now", "what tyres are they on", "is there a safety car", live commentary) and a hard precondition ("The replay must be running and un-paused"). It does not explicitly name a sibling alternative for the non-live case, so it stops short of full when-not guidance.

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