Skip to main content
Glama

RCO Records - Record of Cleared Orders

write_receipt

Idempotent

Write one v1 receipt for a read a gate has cleared. Authenticated: Authorization: Bearer . Idempotent on (writer, subject, subject_type, market, rule_version, cleared_at, answer_hash). Returns the receipt.

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": {
      "subject": "<subject>",
      "subject_type": "<subject_type>",
      "rule_version": "<rule_version>"
    },
    "name": "write_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
callerNowho asked, when the gate knows it: x402:<wallet address>; stored only as its sha256
marketNoISO country or exchange code of the read
subjectYeswhat was read: the identifier (an ISIN, LEI, GTIN, ticker, record id …)
caller_keyNothe customer key the reader presented to the gate (RCO-Key); the door checks it and stores sha256("key:" + key id) as caller
cleared_atNoRFC 3339 UTC; stored to the second; the door's clock when absent
answer_hashNosha256:<hex> of the canonical answer bytes the agent received
rule_versionYesthe rule set and version the gate cleared under
subject_typeYesisin | lei | gtin | ticker | cmr | fo-record | … (open list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / subject_type / description
      Previous value: -"isin | lei | gtin | ticker | cmr | … (open list)"New value: +"isin | lei | gtin | ticker | cmr | fo-record | … (open list)"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the write, idempotent, non-destructive, closed-world profile, so the description's main added value is the auth requirement (Bearer writer token) and the precise idempotency key tuple. That key composition is genuine behavioral detail an agent cannot get from the annotations. It does not cover error behavior or token scoping, which keeps it below a 5.

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?

Three tight sentences: action and scope first, then auth, then idempotency, then return. No filler and nothing buried.

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?

For a mutation tool with eight parameters and no output schema, the description covers auth, idempotency, and that a receipt is returned, which is a reasonable baseline. It omits the caller vs. caller_key distinction, whether market or cleared_at are optional in practice, and what a deduplicated response looks like. The missing parameter guidance is the main gap.

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 field meaning is already documented; however, the description adds the idempotency tuple listing exactly which fields (writer, subject, subject_type, market, rule_version, cleared_at, answer_hash) drive deduplication. That is operational meaning beyond the schema. It does not clarify the caller vs. caller_key relationship or which is preferred, leaving a notable ambiguity.

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?

"Write one v1 receipt for a read a gate has cleared" gives a specific verb (write), a specific resource (receipt), and a scope condition (a gate-cleared read) that separates it from siblings like list_receipts and verify_receipt. It stops short of naming those siblings explicitly.

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 precondition "for a read a gate has cleared" implies when the tool applies, but there is no explicit when-to-use, when-not, or pointer to alternatives such as verify_receipt or get_statement. The agent must infer the workflow position from the phrase alone.

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.