Skip to main content
Glama
fastf1-mcp-server

fastf1-mcp-server

by Surya96t

get_speed_trap_data

Retrieve speed trap and top-speed data for all Formula 1 drivers in a session, including finish-line and sector speeds, with per-lap fallback when results data is missing.

Instructions

Get speed trap and top-speed data for all drivers in a session.

Data source: FastF1 Live Timing (session results) Coverage: 2018-present

Args: year: Season year (2018+) event: Race name or round number session: Session type (R, Q, S, FP1, FP2, FP3)

Returns: { "source": "results" | "laps", "drivers": [ {"driver": "VER", "fullName": "Max Verstappen", "teamName": "Red Bull Racing", "speedTrap": 298.5, "speedFL": 187.2, "speedI1": 245.0, "speedI2": 268.5}, ... ] }

Example: get_speed_trap_data(2024, "Monza", "Q") → {"source": "results", ...}

Note: SpeedST = official speed trap measurement. SpeedFL = speed at the finish line. SpeedI1/I2 = sector intermediate speed measurements. Values are in km/h.

FastF1 publishes per-driver speed columns on `session.results`, but
for many sessions those columns are entirely empty. When the
results-level data is missing, we fall back to the per-lap max
across `session.laps` for the same columns. `source` indicates
which path produced the response.

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_speed_trap_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearYes
eventYes
sessionYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A4.3/5.0
Behavior5/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 so unusually well: it discloses the upstream data source (FastF1 Live Timing), states that results-level speed columns are often empty and that the tool falls back to per-lap maxima from session.laps, and explains that the `source` field reveals which path was used. It also defines each speed column's meaning and states units (km/h), which an agent cannot infer from structured fields.

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?

The Args/Returns/Note/Example layout is front-loaded and easy to scan, and each explanatory section earns its place. The verbose JSON block under 'Returns' largely duplicates the existing output schema and is the one section that could be trimmed without loss.

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 3-parameter read tool with an output schema, the description supplies everything an agent needs: temporal coverage limits, parameter formats, unit conventions, column definitions, and the critical caveat about missing upstream data plus the fallback behavior. Nothing material for correct invocation is absent.

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: year is bounded (2018+), event is documented as accepting either a race name or a round number (resolving the string|integer anyOf ambiguity), and session enumerates the accepted codes (R, Q, S, FP1, FP2, FP3). The example call anchors all three parameters concretely.

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 description opens with a specific verb and resource: 'Get speed trap and top-speed data for all drivers in a session,' which is clearly distinct from generic siblings like get_session_results or get_lap_telemetry. It never explicitly names or excludes an alternative, so it does not fully satisfy the sibling-differentiation bar for a 5.

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?

Usage is implied rather than stated: 'Coverage: 2018-present' and the session-code list effectively rule out pre-2018 and invalid sessions, and the example shows a qualifying call. There is no explicit statement of when to choose this over get_session_results or get_lap_telemetry, nor any exclusion guidance.

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