Skip to main content
Glama
greencalculus

GreenCalculus

resolve_factor

Match a plain-language request, with country, to ranked emission-factor keys and confidence scores, so you can pick the right key before calculating or looking up a value.

Instructions

Find the best emission-factor key(s) for a plain-language description — the hardest step is picking the right key out of ~16,000. Returns ranked matches, each carrying the key, value, unit and a confidence score; feed the chosen key to a calculate_* tool or lookup_factor. Prefer this over guessing a key. PUT THE COUNTRY IN THE DESCRIPTION. Geography is read from the description text itself, not from a separate field — "diesel per litre" and "diesel per litre France" resolve differently, and omitting the country will quietly return a factor from somewhere else marked "geo_match":"proxy". ACT ON THE LABEL. Every candidate carries label: "accept" or "review", plus "why". "accept" means confidence >= 0.85 and no demotion applied — right about nine times in ten. "review" means the answer may be usable but something is off (low confidence, only one term matched, a proxy country, or a gate demoted it); confirm it before adopting the number rather than using it silently. Roughly half of CORRECT answers are also flagged "review" — that is the intended trade, so treat "review" as "check this", not "discard this". A MISS MAY EXPLAIN ITSELF. When nothing matches, or the only matches are from the wrong country, the response may carry an "absence" object saying WHY. classification "structural" means no publisher issues this anywhere — STOP, do not retry with reworded queries and do not substitute a different country without saying so. "not_yet_sourced" means a publisher exists and we have not ingested it (the publisher is named). "refused" means we found the data and declined it, with the reason. "coupled" means this reads empty only because a related family is empty. Use explain_absence to ask the same question directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional, default 5.
sectionNoOptional section filter, e.g. "fuels", "grid", "freight".
descriptionYesWhat you need a factor for, INCLUDING the country if it matters, e.g. "UK grid electricity", "diesel per litre France", "hotel stay Japan". Geography is parsed from this string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it explains that geography is parsed from the description, that omitting country yields a 'geo_match':'proxy' result, that 'review' is intentionally over-inclusive, and that absence responses have structural meanings that should stop the agent from retrying. This is far beyond minimal behavioral disclosure.

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?

The description is long but each paragraph earns its place: scoping, label semantics, and absence handling are all needed for correct invocation. The use of short capitalized hooks ('PUT THE COUNTRY IN THE DESCRIPTION', 'ACT ON THE LABEL', 'A MISS MAY EXPLAIN ITSELF') front-loads key behaviors and makes the density navigable.

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?

Given three parameters, no annotations, and no output schema, the description provides everything needed to use the tool correctly: what it returns, how the main parameter behaves, how to interpret result labels, what absence responses mean, and how to hand off to related tools. No critical guidance appears missing.

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 baseline is 3, but the description adds real meaning beyond the schema for the critical 'description' parameter: it emphasizes the country must be embedded in the text and gives concrete examples ('diesel per litre France'). This extra semantic context justifies a 4 above baseline.

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 names a specific operation ('find the best emission-factor key(s)') and a concrete resource ('for a plain-language description'), and explains the tool's distinctive role against the 16,000-key problem. It also positions the output as ranked matches with key/value/unit/confidence, and routes the chosen key onward to calculate_* tools or lookup_factor, which separates it from siblings.

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?

The description gives explicit usage direction: 'Prefer this over guessing a key', tells the agent to feed the chosen key to calculate_* or lookup_factor, and points to explain_absence for querying absence directly. It also provides actionable when-to-use/when-not-to-use guidance through the 'accept'/'review' labels and the absence classifications.

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