Skip to main content
Glama

Compute Ledger

Record inventory

record_inventory

Record an audited GHG inventory in a separate append-only chain. mass_g is exact integer grams; content and factor-pack digests are bare lowercase SHA-256 hex. Idempotent on inventory_id.

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": {
      "agent_id": "<agent_id>",
      "inventory_id": "<inventory_id>",
      "mass_g": "<mass_g>",
      "content_digest": "<content_digest>",
      "factor_pack_version": "<factor_pack_version>",
      "factor_pack_digest": "<factor_pack_digest>"
    },
    "name": "record_inventory"
  }
}

Input Schema

NameRequiredDescriptionDefault
mass_gYesInventory total in whole grams CO2e.
agent_idYesId of the agent whose compute or inventory is recorded or read.
source_idsNoOptional. Ids of the factor sources the inventory used.
inventory_idYesId of the GHG inventory, for example from ghg-ledger.
content_digestYesSHA-256 of the inventory content, lowercase hex without prefix.
factor_pack_digestYesSHA-256 of the factor pack, lowercase hex.
factor_pack_versionYesVersion of the emission factor pack used.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed7 schema fields changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Id of the agent whose compute or inventory is recorded or read."
    • addedInput schema / properties / content_digest / description
      Added value: +"SHA-256 of the inventory content, lowercase hex without prefix."
    • addedInput schema / properties / factor_pack_digest / description
      Added value: +"SHA-256 of the factor pack, lowercase hex."
    • addedInput schema / properties / factor_pack_version / description
      Added value: +"Version of the emission factor pack used."
    • addedInput schema / properties / inventory_id / description
      Added value: +"Id of the GHG inventory, for example from ghg-ledger."
    • addedInput schema / properties / mass_g / description
      Added value: +"Inventory total in whole grams CO2e."
    • addedInput schema / properties / source_ids / description
      Added value: +"Optional. Ids of the factor sources the inventory used."
  3. Added

TDQS

B3/5.0
Behavior1/5

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

The annotations declare idempotentHint=false, but the description asserts 'Idempotent on inventory_id' — a direct contradiction on an annotated behavior trait that an agent would rely on when deciding whether to retry. The remaining additions (append-only chain, bare lowercase SHA-256 hex) are useful but do not outweigh the conflicting idempotency claim.

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?

Three short sentences, front-loaded with the operation and chain scope, followed by format and idempotency notes. Tight and readable, though the digest-format sentence duplicates schema text rather than adding value.

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?

With 7 parameters at full schema coverage and an output schema present, the description covers the essentials of a write into an append-only chain. It leaves open what the 'separate chain' means for the caller, what a successful record returns, and how duplicate inventory_ids actually behave despite the idempotency claim.

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%, so every parameter is already documented in the input schema, and the description largely restates it ('exact integer grams' vs. 'whole grams CO2e', 'bare lowercase SHA-256 hex' vs. 'lowercase hex without prefix'). It adds a compact format reminder but no new meaning beyond the schema.

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?

The description uses a specific verb and resource ('Record an audited GHG inventory') and adds a distinguishing scope detail, 'in a separate append-only chain', which separates it from sibling writers like record_work. It stops short of naming an alternative tool, so the differentiation is inferential rather than explicit.

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?

Usage is only implied: the inventory being recorded is already 'audited', and the idempotency note signals that repeat calls are expected. There is no explicit statement of when to choose this over record_work, get_inventory, or verify_inventory_chain, and no stated prerequisites beyond the format rules.

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.