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
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||