Skip to main content
Glama
fastf1-mcp-server

fastf1-mcp-server

by Surya96t

get_sector_times

Retrieve each driver's best sector times and theoretical best lap for a session, optionally including per-lap sector breakdowns.

Instructions

Get best sector times and theoretical best lap for each driver.

Data source: FastF1 Live Timing Coverage: 2018-present

Set include_laps=True when the user wants per-lap sector breakdowns (e.g. "show me Antonelli's sector times each lap") rather than just the per-driver best/theoretical-best summary.

Args: year: Season year (2018+) event: Race name or round number session: Session type (R, Q, S, FP1, FP2, FP3) driver: Optional driver code to filter (default: all drivers) include_laps: If True, include a laps array per driver with each accurate lap's S1/S2/S3 and total lap time. Default False keeps responses compact for the typical "fastest sectors / theoretical best" question.

Returns: For each driver: driver (code), fullName, teamName, bestS1, bestS2, bestS3, theoreticalBest, actualBest, gapSec. With include_laps, each entry also has laps: [{lapNumber, s1, s2, s3, lapTime}, ...].

Example: get_sector_times(2024, "Monaco", "Q") → [ {"driver": "VER", "fullName": "Max Verstappen", "teamName": "Red Bull Racing", "bestS1": "0:00:22.123", "bestS2": "0:00:24.456", "bestS3": "0:00:21.789", "theoreticalBest": "0:01:08.368", "actualBest": "0:01:08.570", "gapSec": -0.202}, ... ]

Note: A negative gapSec means the theoretical best (sum of individual sector bests) is faster than the actual best lap — typical, since sector bests usually come from different laps.

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>"
    },
    "name": "get_sector_times"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearYes
eventYes
driverNo
sessionYes
include_lapsNo

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

A4.3/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 well: it discloses the data source (FastF1 Live Timing), coverage window (2018-present), response shape, the compactness trade-off of the default, and non-obvious semantics such as why gapSec can be negative. It does not cover failure modes (invalid event/session, out-of-range years) or latency.

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?

Front-loaded with purpose, then source/coverage, then Args/Returns/Example/Note in a scannable block structure. The worked example is somewhat verbose but concretely pins down field formats (timestamps, gapSec sign), so most sentences earn their place.

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?

For a five-parameter analytical tool with no annotations, the definition supplies purpose, provenance, coverage, per-parameter meaning, return fields, and an output example with a semantics note. An agent has everything needed to call it and interpret the result.

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 coverage is 0%, so the description must compensate, and it does: every one of the five parameters is explained in Args, including the session code set (R, Q, S, FP1-FP3) that the schema lacks as an enum, the 2018+ constraint on year, event accepting a name or round number, and the driver-code filter default.

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 opening sentence states a specific verb and resource ('Get best sector times and theoretical best lap for each driver'), which is enough to distinguish it from aggregation tools like get_fastest_laps or get_lap_times. It never names those siblings explicitly, so the differentiation is inferred rather than stated.

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

Usage Guidelines4/5

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

Clear guidance is given for the main decision point: set include_laps=True for per-lap breakdowns, with a natural-language user-query example ('show me Antonelli's sector times each lap') and a rationale for the default. What's missing is when to reach for this tool versus the sibling lap/fastest-lap tools.

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