Skip to main content
Glama

Carbon Node UK — GHG & DESNZ Carbon Accounting

Convert UK Reporting Units

convert_uk_units
Read-onlyIdempotent

Zero-LLM-cost deterministic unit converter using UK statutory constants (miles<->km, UK imperial gallons<->litres, therms/MWh/GJ/m3_gas<->kWh, short_ton<->tonne, lbs<->kg, ft2<->m2). Use before calculate_emission when invoice units differ from the factor's uom.

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": {
      "value": "<value>",
      "from_unit": "<from_unit>",
      "to_unit": "<to_unit>"
    },
    "name": "convert_uk_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesNumeric quantity to convert.
to_unitYesTarget unit (e.g. 'kWh', 'litres', 'km', 'kg').
from_unitYesSource unit (e.g. 'm3_gas', 'therms', 'gallons', 'miles', 'MWh', 'lbs').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description still adds real behavioral value: it is deterministic with no LLM cost, and critically it uses "UK statutory constants" and "UK imperial gallons", warning the agent that these factors differ from US conventions. It omits what happens on an unsupported unit pair (error vs. passthrough) and any precision/rounding note.

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 sentences, zero filler. The capability statement comes first and the sequencing instruction to calculate_emission comes second, which is the right order for an agent deciding whether to call it.

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?

A pure three-required-parameter conversion function with full schema coverage and rich annotations needs little more. The one loose end is that there is no output schema and the description does not say whether the result is a bare number or includes the factor used, though for a converter the return value is largely inferable.

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% and already gives examples for from_unit and to_unit ('kWh', 'therms', 'm3_gas'), plus a numeric minimum on value. The description's conversion pairs reinforce which unit strings are valid but add little syntax or format detail the schema does not already supply, so the baseline 3 applies.

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?

"Deterministic unit converter" is a specific verb+resource, and the parenthetical enumerates the exact conversion families supported (miles<->km, UK imperial gallons<->litres, therms/MWh/GJ/m3_gas<->kWh, etc.). This is enough for an agent to decide on sight whether this tool handles its unit pair, without touching the schema.

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?

Explicit usage rule: "Use before calculate_emission when invoice units differ from the factor's uom" names the sibling and the condition that triggers this tool. It stops short of a when-not statement (e.g. currency conversion after calculate_uk_sic_spend, or non-UK unit systems), so the guidance is clear but not exhaustive.

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.