Skip to main content
Glama

Fuel cost calculator

fuel_cost_calculator
Read-onlyIdempotent

Cost of a journey or a year of driving for a petrol or diesel car. If price_per_litre_pence is omitted the latest UK average for that fuel is used.

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": {
      "miles": "<miles>",
      "mpg": "<mpg>"
    },
    "name": "fuel_cost_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
mpgYesmiles per gallon (UK gallons)
fuelNopetrol or diesel
milesYesdistance in miles
price_per_litre_penceNopence per litre, optional

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds one genuinely useful behavioral fact: omitting price_per_litre_pence falls back to the latest UK average for that fuel, revealing an external data dependency. It does not say what units the result is in or how 'a year of driving' maps to the miles parameter.

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?

Two short sentences, zero filler, with the core scope front-loaded and the default-price caveat following. Nothing in it is redundant with the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With four parameters and no output schema, the description should at least indicate the return unit (pence vs. pounds) and how annual mileage is expressed. It covers the input fallback well but leaves the result format unstated for a calculator whose entire purpose is producing a number.

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%, so the baseline is 3, but the description earns an extra point by explaining the concrete behavior of the optional price parameter rather than just restating that it is optional. It does not clarify that miles doubles as annual mileage for the year-of-driving case, which remains a small ambiguity.

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?

The description states a concrete resource and scope: the cost of a journey or a year of driving for a petrol or diesel car. That implicitly separates it from the EV charging calculator sibling by fuel type, but no sibling is named explicitly, so differentiation relies on the agent inferring it from the fuel wording.

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?

Scope is implied (petrol/diesel running cost, single journey or annual), which tells the agent roughly when this applies. There is no explicit when-to-use vs. when-not guidance, no mention of the EV or tax calculator alternatives, and no stated prerequisites.

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.

Resources