Skip to main content
Glama

f1_predict_pit_strategy

Read-onlyIdempotent

Predict the recommended pit-stop strategy for an F1 driver using race session data and current lap. Returns pit lap numbers and tyre compound choices.

Instructions

Predict the optimal pit-stop strategy for a driver in an F1 race session.

Args: session_key: OpenF1 session identifier for a recorded race. driver_number: Driver's race number (e.g. 1 for Verstappen). current_lap: Current lap to project from (default 1 = full race ahead). total_laps: Total race laps. If omitted, inferred from the highest observed lap_number in the fetched laps (correct for Monaco 78 / Spa 44), falling back to 57 when no laps are available. An explicit value always wins.

Returns: data.stop_laps: recommended pit laps. data.compound_sequence: tyre compounds for each stint. data.expected_finish_position: currently always None (not modelled). data.confidence: 0.0-1.0 model confidence. meta.total_laps: race length used (explicit arg, else inferred from laps). meta.estimated: true.

Example: f1_predict_pit_strategy(session_key=9158, driver_number=1) f1_predict_pit_strategy(session_key=9158, driver_number=16, current_lap=20, total_laps=78)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
total_lapsNoTotal race laps. If omitted, inferred from the highest observed lap_number in the fetched laps (correct for Monaco 78 / Spa 44), falling back to 57 when no laps are available. An explicit value always wins.
current_lapNoCurrent lap to project from (default 1 = full race ahead).
session_keyYesOpenF1 session identifier for a recorded race.
driver_numberYesDriver's race number (e.g. 1 for Verstappen).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaNo
errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses important behavioral details beyond the annotations: expected_finish_position is currently always None, confidence is a 0.0-1.0 model output, meta.estimated is always true, and total_laps has a specific inference/fallback strategy. This prevents the agent from over-relying on unmodelled outputs and clarifies the tool's computational nature.

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 well-structured with Args, Returns, and Example sections, and the most important purpose is front-loaded. Some redundancy exists because the Args section repeats the schema descriptions nearly verbatim, but the Returns section and examples add genuine value.

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?

Even though an output schema exists, the description goes further by explaining the shape and semantics of the returned fields, including expected_finish_position limitations, confidence, and total_laps resolution. It also provides two illustrative call examples and documents fallback behavior, making the tool fully actionable for an agent.

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 100%, so the schema already documents all four parameters. The description's Args section largely duplicates the schema text and adds only marginal value through concrete examples and the 'Monaco 78 / Spa 44' clarification already present in the schema. It does not meaningfully extend parameter semantics beyond what structured data provides.

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 specific verb and resource: 'Predict the optimal pit-stop strategy for a driver in an F1 race session.' This clearly distinguishes it from sibling tools like f1_tyre_degradation or f1_undercut_window, which focus on narrower data rather than full strategy prediction.

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?

The description gives clear context for when to use the tool: for projecting pit-stop strategy from a current lap in a race session, with examples. However, it does not explicitly tell the agent when not to use it or name related alternatives such as f1_tyre_degradation or f1_undercut_window, so it stops short of full alternative routing.

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