Skip to main content
Glama

Compute Ledger

Record work

record_work

Record a unit of agent compute work. energy_j = power_w * duration_s; carbon_g follows from grid intensity. If bit_ops is declared, the entry is validated against the Landauer floor (bit_ops * kB * T * ln2) — physically impossible claims are rejected. Idempotent on entry_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>",
      "entry_id": "<entry_id>",
      "power_w": "<power_w>",
      "duration_s": "<duration_s>"
    },
    "name": "record_work"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskNoOptional. A short label for the work.
bit_opsNoOptional. Irreversible bit operations performed; when given, the entry is checked against the Landauer floor.
power_wYesAverage power draw in watts.
agent_idYesId of the agent whose compute or inventory is recorded or read.
entry_idYesYour id for this work entry; recording it again is idempotent.
duration_sYesHow long the work ran, in seconds.
temperature_kNoOperating temperature in kelvin. Default 300.
price_minor_per_kwhNoOptional. Electricity price in minor units per kWh, for cost.
grid_intensity_g_per_kwhNoGrid carbon intensity in grams CO2e per kWh. Default 400.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed9 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 / bit_ops / description
      Added value: +"Optional. Irreversible bit operations performed; when given, the entry is checked against the Landauer floor."
    • addedInput schema / properties / duration_s / description
      Added value: +"How long the work ran, in seconds."
    • addedInput schema / properties / entry_id / description
      Added value: +"Your id for this work entry; recording it again is idempotent."
    • addedInput schema / properties / grid_intensity_g_per_kwh / description
      Added value: +"Grid carbon intensity in grams CO2e per kWh. Default 400."
    • addedInput schema / properties / power_w / description
      Added value: +"Average power draw in watts."
    • addedInput schema / properties / price_minor_per_kwh / description
      Added value: +"Optional. Electricity price in minor units per kWh, for cost."
    • addedInput schema / properties / task / description
      Added value: +"Optional. A short label for the work."
    • addedInput schema / properties / temperature_k / description
      Added value: +"Operating temperature in kelvin. Default 300."
  3. First observed

TDQS

B3.2/5.0
Behavior2/5

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

The description adds genuinely useful behavior: derived energy/carbon values, active rejection of physically impossible claims, and a stated idempotency guarantee. However, that idempotency claim directly conflicts with the supplied idempotentHint=false annotation, leaving the agent with contradictory signals about whether re-posting an entry double-counts (the schema's entry_id field also says it is idempotent, suggesting the annotation is stale). No other annotation-independent detail, such as permission or rate considerations, is given.

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 core operation, then the derivation rules, then the validation caveat and idempotency note. The formulas are dense but each clause carries information; there is little filler.

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?

For a 9-parameter write tool with an output schema and annotations covering safety, the description supplies the computation model and the validation rule that determine whether a call will be rejected. Defaults for temperature and grid intensity are left entirely to the schema, which is acceptable.

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, but the description goes further by explaining how power_w and duration_s combine into energy_j, how carbon_g derives from grid intensity, and what bit_ops is actually checked against. That causal explanation is meaning the schema does not carry.

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?

"Record a unit of agent compute work" gives a specific verb and resource, and the mention of energy/carbon plus the Landauer check makes clear this writes physical-quantity work entries rather than inventory. It never names a sibling, so the distinction from record_inventory or footprint is left implicit.

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

Usage Guidelines2/5

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

The only conditional guidance is about bit_ops triggering validation, which is parameter behavior rather than tool selection. There is no statement of when to call this instead of footprint, carbon_receipt, or record_inventory, and no exclusions or prerequisites.

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.