Skip to main content
Glama
fastf1-mcp-server

fastf1-mcp-server

by Surya96t

get_race_control_messages

Retrieves race control messages, penalties, investigations, and safety car/VSC/red flag periods to explain incidents, track-limit deletions, and strategy calls.

Instructions

Get race control messages, penalties, investigations and SC/VSC/red flag periods.

Data source: FastF1 Live Timing Coverage: 2018-present

Use this to answer "why was there a safety car", "who got a penalty", "what happened on lap 34", "how many laps were deleted for track limits", or to explain strategy calls that were triggered by a neutralisation.

Args: year: Season year (2018+) event: Race name or round number session: Session type — R, Q, S, SQ, FP1, FP2, FP3 (default "R") category: Optional filter on the FastF1 category — "Flag", "SafetyCar", "Drs", "CarEvent", "Other" (case-insensitive) driver: Optional driver code or number — only messages about that car lap_start: Optional first lap to include (inclusive) lap_end: Optional last lap to include (inclusive) export_path: If True (or a directory / .csv path), write the full message list to CSV and omit messages from the response. Large lists (> FASTF1_MCP_AUTO_EXPORT_ROWS, default 50) auto-export; narrow with the filters above to keep them inline.

Returns: { "summary": { "totalMessages": 142, "byCategory": {"Flag": 80, "Other": 40, ...}, "neutralisations": [ {"type": "SC", "startLap": 34, "endLap": 37, "durationSec": 294.9, ...} ], "redFlags": 0, "penalties": [ {"lap": 12, "driver": "SAR", "penalty": "5 SECOND TIME PENALTY", "message": "FIA STEWARDS: 5 SECOND TIME PENALTY FOR CAR 2 ..."} ], "investigations": [...], "trackLimitsDeletions": {"HAM": 3, "VER": 1} }, "messages": [ {"time": "2024-07-07T14:35:12", "lap": 12, "category": "Flag", "flag": "YELLOW", "scope": "Sector", "sector": 7, "driver": null, "tag": null, "message": "YELLOW IN TRACK SECTOR 7"}, ... ] }

Note: summary is computed over the whole session, before the category/driver/lap filters are applied, so the neutralisation and penalty overview is always complete. neutralisations comes from the track-status feed (more reliable than parsing message text).

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

Input Schema

NameRequiredDescriptionDefault
yearYes
eventYes
driverNo
lap_endNo
sessionNoR
categoryNo
lap_startNo
export_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.4/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 (FastF1 Live Timing), coverage window (2018-present), an auto-export row threshold, and the non-obvious behavior that summary is computed pre-filter so the overview is always complete. It does not discuss auth, rate limits, or error cases, keeping it just below 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?

Front-loaded purpose sentence followed by clearly labeled Data source, Coverage, Use, Args, Returns and Note sections, so an agent can scan to what it needs. The verbose Returns block is largely redundant given an output schema exists, which costs some tightness.

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 an 8-parameter tool with zero schema documentation and no annotations, the definition supplies essentially everything an agent needs, including output shape and filter interactions. Only the absence of alternative-routing guidance keeps it short of complete.

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 compensate entirely, and it does: all eight parameters are documented, including enum-like category values, session codes with a default, inclusive lap bounds, and the tricky export_path semantics (boolean vs directory vs .csv path). It adds meaning well beyond the bare schema types.

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?

States a specific verb and resource ('Get race control messages') and immediately enumerates the content types it covers: penalties, investigations, SC/VSC/red flag periods. This makes it clearly distinct from timing/telemetry siblings such as get_lap_times or get_stint_analysis.

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?

Provides explicit when-to-use guidance via quoted example questions ('why was there a safety car', 'who got a penalty'), plus operational guidance to narrow with filters to keep results inline. It stops short of naming alternatives or exclusions, but the intended use cases are unambiguous.

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