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
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds behavioral context about inference of total_laps, model confidence, and that expected_finish_position is not modelled. This goes beyond annotations by explaining data dependencies and limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with Args, Returns, and Example sections. It is concise yet comprehensive, front-loading the purpose. Every sentence adds value, and the example illustrates typical use.

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?

Given the tool's complexity (prediction with multiple parameters and return fields), the description covers all inputs, outputs including meta fields, inference fallback, and example usage. The output schema (implied) is complemented by clear return documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing baseline of 3. The description adds significant value by explaining inference logic for total_laps, the default for current_lap, and clarifying that driver_number is the race number. This enriches understanding beyond schema titles.

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 explicitly states the tool predicts 'optimal pit-stop strategy' for a driver, using specific verbs and resource. It clearly distinguishes from sibling tools like f1_tyre_degradation or f1_race_pace_compare by its unique focus on strategy.

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?

The description gives examples of usage but does not explicitly state when to use this tool versus alternatives, nor does it provide when-not-to-use guidance. The context implies it's for pit strategy, but no exclusions or comparisons are made.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ninjabeam20/SportIQ-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server