Skip to main content
Glama

calculate_activity

Turn activity data into greenhouse-gas emissions: emissions = activity × factor. Give an amount + unit and a factor key; the unit engine converts to the factor basis (MWh→kWh, tonne→kg, gallon→litre, mile→km) and returns the emissions with the working, the GHG Protocol scope, and the source. Use search_factors / lookup_factor to find the factor key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityYes{ "value": <number>, "unit": "<unit e.g. kWh, MWh, litres, tonne, km>" }.
factor_keyYesCanonical emission-factor key.

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behaviors: the unit engine converts to the factor basis (with example conversions: MWh→kWh, tonne→kg, gallon→litre, mile→km) and returns the emissions with the working, GHG Protocol scope, and source. This goes beyond the raw schema and gives concrete insight into the tool's output and conversion logic, though it does not mention failure modes or validation behavior.

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 three sentences, each earning its place: the first states the purpose and formula, the second gives the input instructions and output highlights, and the third points to companion lookup tools. It is front-loaded with the core purpose and has no redundant or filler content.

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?

Given the tool has no annotations and no output schema, the description covers the essential context: what it does, how inputs are transformed, what the response includes, and where to find factor keys. It is complete enough for an agent to select and invoke the tool correctly. The only gap is the lack of explicit mentions of error conditions or unsupported units, but the description still provides strong operational guidance.

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. The description adds meaning beyond the schema by explaining the unit conversion behavior ('the unit engine converts to the factor basis') and providing examples of supported unit mappings. It also advises how to find the factor_key via search_factors/lookup_factor, giving practical context for that parameter. This raises it to a 4, though it does not fully detail every edge case for the activity object's value.

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 opens with a clear statement: 'Turn activity data into greenhouse-gas emissions: emissions = activity × factor.' This names the specific verb ('turn'/'calculate'), the resource ('greenhouse-gas emissions'), and the exact formula. It distinguishes from the specialized siblings (calculate_electricity, calculate_freight, etc.) by positioning itself as the generic activity calculator, and it points to search_factors/lookup_factor for factor keys, reinforcing its role.

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 provides usage instructions: 'Give an amount + unit and a factor key' and advises using search_factors/lookup_factor to find the factor key. However, it does not explicitly state when to prefer this tool over the sibling calculate_* tools or when not to use it. The guidance is implied (generic vs. specialized) but lacks explicit exclusions or alternative selection criteria.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct role: search, lookup single, lookup batch, resolution, absence explanation, and separate calculation methods for distinct scopes. Even the discovery tools can be told apart by whether the input is a key, text, natural language, or a purpose. Domain calculators are cleanly separated by type of activity, so an agent should not confuse them.

Naming Consistency5/5

All tools follow a consistent verb_nonn pattern: calculate_*, lookup_factor(s), search_factors, resolve_factor, explain_absence. The naming clearly signals both action and object, and even the singular/plur lookup distinction matches the batch versus single-key semantic.

Tool Count5/5

Twelve tools is well-sopened for a broad emissons-factor API: six calculators, four discovery/lookup/resolution tools, one batch lookup, and one edge-case explainer. Each tool appears to serve a necessary purpose rather than adding redundant surface area.

Completeness5/5

The set covers the full workflow: discover factors, resolve amiguous plain-language queries, look them up individually or in batch, perform domain-relevant calculations, and even explain why a factor is absent. The main GHG scopes are covered by dedicated calculators while the generic calculate_activity fills gaps for any other factor data.

Resources