Skip to main content
Glama
fastf1-mcp-server

fastf1-mcp-server

by Surya96t

get_fastest_laps

Retrieve one lap per driver in ascending lap-time order from an F1 session, with an optional top_n limit, to compare driver pace across race or qualifying sessions.

Instructions

Get fastest laps in a session, one per driver.

Data source: FastF1 Live Timing Coverage: 2018-present

Args: year: Season year (2018+) event: Race name or round number session: Session type (default "R") top_n: Number of fastest laps to return (default 10)

Returns: Fastest laps sorted by time: lapNumber, lapTime, sector1, sector2, sector3, compound

Example: get_fastest_laps(2024, "Monaco", "R", 5) → [ {"lapNumber": 67, "lapTime": "0:01:15.456", "compound": "SOFT", ...}, ... ]

Note: Returns one fastest lap per driver. Only accurate laps are included.

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

Input Schema

NameRequiredDescriptionDefault
yearYes
eventYes
top_nNo
sessionNoR

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.0
    • addedOutput schema / properties / result / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / result / items
      Removed value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}
    • removedOutput schema / properties / result / type
      Removed value: -"array"
  2. Addedv0.2.0
  3. Removed
  4. First observedv0.1.0

TDQS

A3.7/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 reasonably well: it discloses the upstream data source, the coverage window, and the non-obvious filtering rule that only accurate laps are returned and only one lap per driver. It omits error behavior and any caveats about missing timing data, which keeps it from a 5.

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

Conciseness4/5

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

Purpose is front-loaded, and the Args/Returns/Example/Note structure is easy to scan. The Example block is somewhat verbose and partly duplicates the Returns list, but the illustration of the lapTime string format earns most of its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only query tool with an output schema already present, the definition covers purpose, source, coverage, parameter meanings, and sort order. The main missing piece is the valid set of session codes, which an agent would need to call the tool confidently without guessing.

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

Parameters3/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 compensate, and it partly does: it explains that event accepts a race name or round number (resolving the anyOf ambiguity in the schema) and restates defaults for session and top_n. It still fails to enumerate valid session values beyond the "R" default, leaving a real gap for a 4-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource ("Get fastest laps in a session") and adds a scoping constraint ("one per driver") that separates it from the broader get_lap_times sibling. It stops short of naming that sibling explicitly, so an agent must infer the distinction from scope alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description supplies useful usage context — data source (FastF1 Live Timing) and a 2018-present coverage window — which effectively tells the agent when the tool is inapplicable. However, it never states when to choose this over get_lap_times or get_sector_times, nor any prerequisites.

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