Skip to main content
Glama

Open Footprint: convert units

ofp_convert
Read-onlyIdempotent

Use this when a measurement needs converting between units (kWh to MJ, bbl to m3). Resolve unsure codes with ofp_units first.

Answers {value, unit, provenance}; keep provenance. A 422 refusal is data: error (unresolved_unit, incompatible_dimension, assumption_required, invalid_conversion_parameters) + detail; read it, do not blind-retry. Volume to energy/mass needs a declared assumption (calorificValue or density); the detail names required fields — never invent. dictionary ([name@]version) is a pin; mismatches refuse. Not CO2e.

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>",
      "fromUnit": "<fromUnit>",
      "toUnit": "<toUnit>"
    },
    "name": "ofp_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYes
toUnitYes
fromUnitYes
assumptionNo
dictionaryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent safety, yet the description adds substantial new context: the {value, unit, provenance} return shape with an instruction to keep provenance, a structured 422 error taxonomy (unresolved_unit, incompatible_dimension, assumption_required, invalid_conversion_parameters) with a no-blind-retry rule, and dictionary-pin refusal behavior. This goes well beyond the annotation bar.

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?

Front-loaded with the use case, then scoped to returns, errors, assumptions, and pinning, with no filler. It is telegraphic in places ('keep provenance', 'Not CO2e'), which costs a little clarity but not enough to warrant trimming content.

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?

With no output schema and 0% parameter coverage, the description still covers inputs (assumption, dictionary), outputs (value/unit/provenance), and failure modes (422 taxonomy, no retry). An agent can call this correctly and interpret refusals without guessing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry parameter meaning, and it does: it explains that volume→energy/mass requires a declared assumption (calorificValue or density) and that the detail names required fields, and that dictionary is a [name@]version pin whose mismatch refuses. This is exactly the meaning the bare schema lacks.

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?

States a specific verb+resource ('converting between units') with concrete examples (kWh to MJ, bbl to m3), and the 'Not CO2e' clause draws a boundary an agent could not infer from the name alone. Distinguishable from ofp_units, which resolves codes rather than converting.

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

Usage Guidelines5/5

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

Explicit trigger ('when a measurement needs converting between units'), an explicit routing rule (resolve unsure codes with ofp_units first), and an explicit exclusion (not CO2e). Nothing about when to call it is left to inference.

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.