Skip to main content
Glama
Surya96t

fastf1-mcp-server

get_lap_times

Get all lap times for a Formula 1 driver in a session, with summary statistics and optional CSV export for data analysis.

Instructions

Get all lap times for a driver in a session.

Data source: FastF1 Live Timing Coverage: 2018-present

Set export_path=True when the user mentions data analysis, notebooks, pandas, ML, "save as CSV", "export the data", or any downstream processing — the full per-lap array is then written to a CSV file the user can open directly. Large responses (>50 laps) also auto-export so the user always gets a real file path in the project rather than the MCP client silently spilling the response to a temp file.

Args: year: Season year (2018+) event: Race name or round number session: Session type (R, Q, S, FP1, FP2, FP3) driver: Driver code (e.g., "VER") or number (e.g., "1") include_deleted: Include deleted lap times (default False) export_path: If True, write the full per-lap array to a CSV in the configured export directory (default ./fastf1-exports/, override via FASTF1_MCP_EXPORT_DIR) and omit laps from the response. Pass a string for a custom directory or .csv file path. The server also auto-exports when the lap count exceeds FASTF1_MCP_AUTO_EXPORT_ROWS (default 50).

Returns: Default (no export): { "driver": "VER", "fullName": "Max Verstappen", "teamName": "Red Bull Racing", "summary": {...}, "laps": [{"lapNumber": 1, "lapTime": "0:01:30.456", ...}, ...] }

With export_path:
{
    "driver": "VER", "fullName": ..., "teamName": ...,
    "summary": {...},
    "exportPath": "/abs/path/to/get_lap_times_2024_monaco_r_ver_<ts>.csv",
    "rowCount": 52
}

Note: Deleted laps (e.g., track limits violations) are excluded by default. Set include_deleted=True to include them. summary lets a caller answer fastest/avg/compound questions without re-parsing the full per-lap array. Use export_path=True to grab the full dataset as CSV for downstream analysis / ML work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYes
eventYes
sessionYes
driverYes
include_deletedNo
export_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses data source (FastF1 Live Timing), coverage (2018-present), auto-export behavior, and the dual response format (with/without export). It explains that deleted laps are excluded by default and that summary provides aggregated info to avoid parsing the full array.

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 clear sections (data source, coverage, usage hint, Args, Returns, Note). It is front-loaded with the core purpose and each sentence earns its place. Despite length, it remains focused and avoids redundancy.

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?

With six parameters, no annotations, and a detailed output schema documented inline, the description covers all necessary aspects: parameter explanations, behavior, return format, and edge cases (deleted laps, auto-export). It is fully complete for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully explain parameters. It does so for all six parameters: year, event, session, driver, include_deleted, and export_path. It provides types, defaults, and special behavior (e.g., export_path accepts custom directory or file path, auto-export threshold). This adds significant value beyond the schema.

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 states it retrieves all lap times for a driver in a session, specifying the verb (get), resource (lap times), and scope (per driver per session). It clearly distinguishes from sibling tools like get_fastest_laps (which gets only fastest laps) and get_sector_times (sector-level data).

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 provides explicit usage guidance: when to set export_path (e.g., data analysis, ML, save as CSV) and mentions auto-export for >50 laps. It also advises setting include_deleted to include deleted laps. While it does not explicitly contrast with siblings, the purpose is distinct enough that no further exclusions are needed.

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/Surya96t/fastf1-mcp'

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