Skip to main content
Glama

Carbon Node UK — GHG & DESNZ Carbon Accounting

Calculate Batch Emissions (1–100 Lines)

calculate_batch
Read-onlyIdempotent

Deterministic batch calculation for 1 to 100 activity lines in a single APIM call, returning per-line kg_co2e/t_co2e, Scope 1/2/3 subtotals, total_t_co2e, and permanent catalog_url citations.

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": {
      "line_items": "<line_items>"
    },
    "name": "calculate_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearNolatest
line_itemsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/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 description rightly focuses on what they don't cover: determinism, the 100-line ceiling, a single round trip, and the exact return payload including Scope 1/2/3 subtotals and permanent catalog citations. That is meaningful added context, though nothing is said about failure behavior for invalid factor_id or oversized batches.

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?

A single front-loaded sentence that puts the operation, the batch limit, and the return contents in that order, with no filler. Every clause carries information an agent would otherwise have to guess.

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?

Return values are well covered despite there being no output schema, and the safety profile is handled by annotations. The gaps are on the input side: an entirely undocumented 'year' parameter and undefined nested item semantics leave an agent guessing for a tool whose schema coverage is 0%.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden, and it largely fails: the 'year' parameter is never mentioned, and the nested line_item fields (ref, quantity, factor_id, description) are only alluded to as 'activity lines'. Only the count constraint (1-100) is conveyed, which the schema already enforces via minItems/maxItems.

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?

Names a specific verb and resource ('batch calculation' for 'activity lines') and scopes it to 1-100 lines in a single APIM call, which implicitly separates it from the singular sibling calculate_emission. It stops short of explicitly naming the alternative, so an agent must infer the split from the batch wording alone.

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 1-100 line range and 'single APIM call' framing imply the batch use case (many lines at once rather than repeated singleton calls), and 'deterministic' hints at repeatability expectations. However, it never states when an agent should prefer this over calculate_emission, nor what to do for inputs outside the 1-100 range.

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.