plot_track_map
Draws a circuit map as a PNG: plot one lap's racing line coloured by speed or gear with numbered corners and DRS zones, or show every car's position and running order at the start of a chosen lap.
Instructions
Draw the circuit map. Two modes:
Lap trace (default): the racing line of one lap coloured by speed or gear, with numbered corners, DRS zones and the direction of travel.
Car positions (
at_lap=N): where every car was on track at the moment the leader started lap N, with the running order listed.
Returns a PNG image.
Data source: FastF1 Live Timing position data + MultiViewer corners Coverage: 2018-present
Use for "show me the track", "where is the car fastest", "which gear through each corner", or "where was everyone when the safety car came out on lap 34".
Args:
year: Season year (2018+)
event: Race name or round number
session: Session type (default "Q"; use "R"/"S" for at_lap)
driver: Driver whose lap is traced (default: the session's fastest lap)
lap: Lap number or "fastest" (default)
color_by: "speed" (default), "gear" or "none"
at_lap: Draw car positions at the start of this lap instead of a trace
highlight: Up to 8 driver codes coloured in positions mode
(default: the top three at that moment)
show_corners: Number the corners (default True)
show_drs: Highlight DRS zones on the trace (default True)
save_path: If True, also write the PNG to the export directory
(default ./fastf1-exports/); a string is a directory or
a full .png path.
Returns: An image plus a caption. Structured content has the lap used, DRS zones and, in positions mode, the running order.
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>"
},
"name": "plot_track_map"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lap | No | fastest | |
| year | Yes | ||
| event | Yes | ||
| at_lap | No | ||
| driver | No | ||
| session | No | Q | |
| color_by | No | speed | |
| show_drs | No | ||
| highlight | No | ||
| save_path | No | ||
| show_corners | No |