Skip to main content
Glama
RudrenduPaul

ComputeLedger MCP Server

Record compute usage

record_usage

Record workload compute usage to generate a signed, tamper-evident receipt that provides portable proof for billing reconciliation and cross-provider audits.

Instructions

Records one unit of compute usage (provider, hardware, duration, and optional GPU-hours/FLOPs/workload type) as a signed, hash-chained receipt in the local ComputeLedger ledger, and returns that receipt as portable, independently verifiable proof of the usage claim. Call this after a workload finishes (or with measured/estimated values) when you need durable evidence of compute consumed, e.g. reconciling a provider's bill or building a cross-provider audit trail. Do not call it for read-only lookups (use list_ledger) or to check a receipt you already have (use verify_receipt). Requires a local Ed25519 keypair generated beforehand via computeledger keys generate; the call fails if none exists.

Side effects: mutating and NOT idempotent, each call appends a new entry (fresh UUID and timestamp) to the local ledger file (~/.computeledger by default, or ./.computeledger when local=true) and reads the private key from disk. No network calls are made. On failure (missing keypair, invalid duration, etc.) it returns is_error=true with a JSON {"error": ""} body instead of raising.

Parameters: provider (str, e.g. 'aws', 'lambda-labs', 'on-prem'), hardware (str, e.g. 'nvidia-h100', 'nvidia-a100', 'cpu'), durationSeconds (float >= 0), gpuHours and estimatedFlops (optional float >= 0), workloadType (optional enum: training | inference | unknown), local (optional bool). Equivalent CLI: computeledger record --provider aws --hardware nvidia-h100 --duration-seconds 3600 --gpu-hours 1 --workload-type training --json.

Returns the full signed receipt as JSON: version, id, timestamp (ISO-8601 UTC), provider, hardware, usage {durationSeconds, gpuHours, estimatedFlops, gpuUtilizationSamples, workloadType}, command, prevHash, publicKey, hash, and signature. Pass this object straight into verify_receipt to independently confirm it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localNoUse the current directory's .computeledger instead of the home directory
gpuHoursNoGPU-hours consumed, if known
hardwareYesHardware identifier, e.g. 'nvidia-h100', 'nvidia-a100', 'cpu'
providerYesCompute provider name, e.g. 'aws', 'lambda-labs', 'on-prem'
workloadTypeNo
estimatedFlopsNoEstimated floating point operations, if known
durationSecondsYesWall-clock duration of the workload in seconds
Behavior5/5

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

With no annotations provided, the description fully discloses side effects: it is 'mutating and NOT idempotent', appends a new entry to the local ledger, reads the private key from disk, makes no network calls, and returns is_error=true with a JSON error body on failure. This is far beyond what the schema alone provides.

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 well-structured: opening purpose, usage guidance, side-effect disclosure, parameter summary, CLI example, and return-value explanation. Every sentence earns its place, and the most important behaviors are front-loaded in the first paragraph.

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?

Despite having no output schema, the description specifies the full receipt JSON structure (version, id, timestamp, prevHash, hash, signature, etc.) and explains verification via verify_receipt. It covers prerequisites, side effects, failure modes, and alternative tools, making it complete for a tool with this complexity.

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 high (86%), but the description still adds valuable meaning beyond the schema: it provides concrete examples for provider/hardware ('aws', 'lambda-labs', 'nvidia-h100'), clarifies gpuHours/estimatedFlops as optional floats, and includes an equivalent CLI invocation that reinforces parameter semantics. The only minor gap is not elaborating on local beyond 'optional bool', but the schema already covers that.

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 specific verb+resource: 'Records one unit of compute usage ... as a signed, hash-chained receipt in the local ComputeLedger ledger.' It clearly distinguishes this tool from siblings by explaining it creates evidence of usage, while verify_receipt checks receipts and list_ledger does read-only lookups.

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?

It explicitly states when to call ('after a workload finishes ... when you need durable evidence') and when not to ('Do not call it for read-only lookups (use list_ledger) or to check a receipt you already have (use verify_receipt)'). It also mentions a prerequisite (generate keypair) and failure behavior, giving clear context for tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RudrenduPaul/ComputeLedger'

If you have feedback or need assistance with the MCP directory API, please join our Discord server