Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Fuel Consumption

calculate_fuel_consumption
Read-onlyIdempotent

Calculate fuel consumption in L/100km and MPG from distance and fuel used. Returns: {l_100km, mpg_us, mpg_uk, co2_g_km_petrol}. See list_bundles for related 'auto-transport' calculators.

Input Schema

NameRequiredDescriptionDefault
distance_kmYesDistance in km
fuel_litersYesFuel consumed in liters

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds the shape of the result set (l_100km, mpg_us, mpg_uk, co2_g_km_petrol), but since an output schema exists, that restates structured data rather than disclosing new behavioral traits such as how co2 is derived or edge-case handling.

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?

Two sentences, front-loaded with the core computation and its output units. The trailing list_bundles pointer is mildly tangential but short enough not to bloat the definition.

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 a simple two-parameter calculator with full schema coverage, an output schema, and annotations covering the safety profile, the description supplies everything needed to invoke it correctly. Only the missing sibling differentiation keeps it from being fully complete.

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 coverage is 100% and both parameters (distance_km, fuel_liters) are documented in the schema with units and minimums. The description's mention of 'distance and fuel used' mirrors the schema without adding constraints, formats, or units beyond what is already given; baseline 3 applies.

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?

States a specific verb (Calculate), resource (fuel consumption), the output units (L/100km and MPG), and the inputs (distance and fuel used). This implicitly distinguishes it from relatives like convert_fuel_consumption and calculate_fuel_economy_conversion, though it never names those siblings explicitly to sharpen the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use, no when-not, and no named alternative. The only pointer is 'See list_bundles for related auto-transport calculators,' which is discovery navigation rather than guidance on choosing this tool over convert_fuel_consumption or calculate_fuel_cost.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.