compare_telemetry
Compare two drivers’ telemetry on the same lap or fastest lap to show speed and time deltas by distance, with optional CSV export for further analysis.
Instructions
Compare telemetry between two drivers on the same session.
Data source: FastF1 Live Timing Coverage: 2018-present
Set export_path=True when the user wants the comparison data for
analysis (notebook, pandas, ML, "plot where one driver gains time",
"save the comparison"). Comparisons at the default 200 sample size
also auto-export.
Args:
year: Season year (2018+)
event: Race name or round number
session: Session type (R, Q, S, FP1, FP2, FP3)
driver1: First driver code (e.g., "VER")
driver2: Second driver code (e.g., "LEC")
lap: Lap number or "fastest" — applied independently to each driver
sample_size: Telemetry points per driver (default 200, max 500)
export_path: If True, write the per-distance comparison array to
a CSV in the configured export directory (default
./fastf1-exports/, override via FASTF1_MCP_EXPORT_DIR)
and omit comparison from the response. Pass a string
for a custom directory or .csv file path.
Returns: { "driver1": {"code": "VER", "lapNumber": 18, "lapTime": "1:10.123"}, "driver2": {"code": "LEC", "lapNumber": 20, "lapTime": "1:10.456"}, "comparison": [ {"distance": 0.0, "speed1": 280.0, "speed2": 275.0, "speedDelta": 5.0, "timeDelta": 0.0}, ... ], "summary": { "lapTimeDeltaSec": 0.333, "maxSpeedDelta": 8.2, "sectors": { "S1": {"driver1": "0:00:28.123", "driver2": "0:00:28.456", "deltaSec": -0.333}, "S2": {...}, "S3": {...} }, "driver1Telemetry": {"maxSpeedKph": 325.0, "brakingZones": 7, ...}, "driver2Telemetry": {"maxSpeedKph": 320.5, "brakingZones": 8, ...} } }
Example: compare_telemetry(2024, "Monaco", "Q", "VER", "LEC")
Note: timeDelta is the cumulative time gap (seconds) at each distance point: driver1's elapsed time minus driver2's. Negative = driver1 is ahead (reached that point sooner); positive = driver1 is behind. This matches the sign of lapTimeDeltaSec and the sector deltaSec values. Uses the recorded Time channel when present, otherwise integrates speed. Comparison is aligned to driver1's distance axis.
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": {
"year": "<year>",
"event": "<event>",
"session": "<session>",
"driver1": "<driver1>",
"driver2": "<driver2>"
},
"name": "compare_telemetry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lap | No | fastest | |
| year | Yes | ||
| event | Yes | ||
| driver1 | Yes | ||
| driver2 | Yes | ||
| session | Yes | ||
| export_path | No | ||
| sample_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||