Skip to main content
Glama

Fuel cost of a trip

calc_fuel_cost
Read-onlyIdempotent

Calculates trip fuel needs and cost from distance, fuel price, and consumption; supports round trips, cost splitting, two-car comparison, and consumption unit conversion.

Instructions

Fuel needed and cost of a trip from distance (km or miles, optionally round trip), fuel price (per litre, US gallon or UK gallon) and consumption in L/100 km, km/L, mpg (US) or mpg (UK); split between people; cost per km/mile and per 100. Optionally compare a second car (its own consumption and, if different, fuel price). Also converts the consumption to the other units. Web version: https://s3eidat.github.io/fuel-cost/

Input Schema

NameRequiredDescriptionDefault
nameNoName of the car (default "Car A").
priceYesFuel price per priceUnit.
peopleNoSplit the cost between this many people.
compareNoOptional second car to compare.
currencyNoCurrency label for the text, e.g. "JD" or "$".
distanceYesTrip distance (one way unless roundTrip).
priceUnitNoThe price is per litre, US gallon or UK gallon.L
roundTripNoDouble the distance (there and back).
consumptionYesCar consumption / economy, e.g. 7.5 (L/100 km) or 35 (mpg).
distanceUnitNoDistance unit.km
consumptionUnitNol100 = L/100 km, kml = km/L, mpgus, mpguk.l100

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish readOnlyHint, idempotentHint, and openWorldHint=false, so safety is covered. The description adds meaningful behavioral context: it splits cost between people, computes per-km/mile and per-100 costs, optionally compares a second car, and converts consumption units. It does not explain output formatting or rounding, but the added detail is substantial.

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 a dense single sentence with semicolons, but it is front-loaded with the main purpose and covers the major optional features efficiently. The web-version link is extraneous but minor; no sentence is entirely wasted.

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 11-parameter tool with nested comparison options and no output schema, the description explains the core outputs (fuel needed, total cost, per-distance cost, per-100 cost, split cost, comparison results, unit conversion). It does not specify the output shape or rounding behavior, but it is complete enough for correct invocation.

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 every parameter including units and defaults. The description restates the key inputs and their relationships, adding a useful overview but little semantic detail beyond what the schema provides. Baseline 3 is appropriate when the schema carries the explanatory burden.

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 uses specific verbs and resources: it computes fuel needed and trip cost from distance, fuel price, and consumption, with optional splitting/comparison. This clearly distinguishes it from sibling calculators like calc_split_bill or calc_unit_convert, and an agent can identify its function immediately.

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 implies when to use it by listing supported scenarios (round trips, people splitting, second-car comparison, consumption conversion), but it never explicitly says when to choose this over alternatives like calc_split_bill or calc_unit_convert. Usage is clear enough from context but lacks explicit routing guidance.

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

Deploy Server

Other Tools