Skip to main content
Glama
fastf1-mcp-server

fastf1-mcp-server

by Surya96t

get_tyre_degradation

Estimates tyre degradation in seconds lost per lap of tyre age per stint and compound, with fuel-effect correction, so you can compare compounds, spot crossovers and explain pit timing.

Instructions

Estimate tyre degradation (seconds lost per lap of tyre age) per stint and per compound, with fuel-effect correction.

Data source: FastF1 Live Timing Coverage: 2018-present

Use for "how fast did the softs degrade", "which compound was best", "why did X pit so early", "when does the medium overtake the soft", or long-run analysis in practice (session="FP2").

Method: for each stint, keep accurate green-flag laps (no in/out laps, no lap 1), drop outliers slower than 107% of the stint median, add fuel_correction_sec_per_lap × (lap − 1) to remove the fuel-burn effect, then fit lap time against tyre age. The slope is the degradation rate.

Args: year: Season year (2018+) event: Race name or round number session: "R" (default), "S", or a practice session ("FP1"-"FP3") driver: Optional driver code to restrict to one driver min_stint_laps: Minimum clean laps a stint needs to be fitted (default 6) fuel_correction_sec_per_lap: Lap-time gain per lap from fuel burn (default 0.06 s/lap; 0 disables) export_path: If True (or a directory / .csv path), write the per-stint table to CSV and omit stints.

Returns: { "method": {"fuelCorrectionSecPerLap": 0.06, "minStintLaps": 6}, "summary": { "compounds": { "MEDIUM": {"stints": 14, "medianDegSecPerLap": 0.051, "medianFreshTyrePaceSec": 93.42, "avgStintLaps": 21.3}, "HARD": {...} }, "compoundCrossovers": [ {"faster": "MEDIUM", "slower": "HARD", "freshPaceGapSec": 0.42, "crossoverTyreAge": 18} ], "lowestDeg": [{"driver": "HAM", "compound": "HARD", "degSecPerLap": 0.012}, ...] }, "stints": [ {"driver": "VER", "stintNumber": 2, "compound": "HARD", "startLap": 18, "endLap": 57, "lapsUsed": 33, "tyreAgeStart": 1, "tyreAgeEnd": 40, "degSecPerLap": 0.031, "rawSlopeSecPerLap": -0.029, "r2": 0.62, "freshTyrePaceSec": 93.1, "avgLapTimeSec": 94.2}, ... ] }

Note: Degradation is an estimate — traffic, dirty air and push/lift phases add noise; check r2 (closer to 1 = cleaner trend) and lapsUsed. freshTyrePaceSec is the fitted, fuel-corrected lap time at tyre age 1, comparable across stints and drivers. crossoverTyreAge is the tyre age at which the faster-when-fresh compound's higher degradation makes it slower than the other; it is null (with a note) when that age is beyond the oldest tyre run on the faster compound.

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

Input Schema

NameRequiredDescriptionDefault
yearYes
eventYes
driverNo
sessionNoR
export_pathNo
min_stint_lapsNo
fuel_correction_sec_per_lapNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.5/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 names the data source, coverage window, filtering method, fuel correction, and fit procedure. It also warns that results are estimates and tells the agent to inspect r2 and lapsUsed. It could add explicit read-only safety or error behavior for 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?

The description is long but well structured with Args, Returns, and Note sections, and it front-loads the purpose and method. The extended Returns block is somewhat redundant because an output schema exists, which costs some conciseness, but the complexity of the tool justifies most of the detail.

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 seven-parameter analysis tool with no annotations, zero schema descriptions, and an output schema, the definition is complete. It covers purpose, method, data source, parameter meanings, return structure, and interpretive caveats such as dirty air and r2 interpretation.

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 document all seven parameters, and it does: year, event, session, driver, min_stint_laps, fuel_correction_sec_per_lap, and export_path. It adds meaningful details such as event accepting a race name or round number, session defaults, and export_path writing a CSV while omitting stints.

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 opens with a precise verb and resource: 'Estimate tyre degradation... per stint and per compound, with fuel-effect correction.' It clearly defines the niche as regression-based degradation rate, which distinguishes it from general stint or pace tools even without naming a sibling.

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?

It gives several concrete use cases, including 'how fast did the softs degrade', 'which compound was best', and long-run analysis in FP2. It does not explicitly say when not to use this tool or name a specific alternative such as get_stint_analysis, which keeps it from a 5.

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