Skip to main content
Glama

RCO-A2A - Record of Cleared Orders

write_receipt

Idempotent

Called by Allooloo's own MCPs when a read is cleared. One receipt per cleared read.

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. Changed12 schema fields changed
    • removedInput schema / properties / actor_class
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / answer_hash
      Added value: +{
      +  "description": "sha256:<hex> of the canonical answer bytes the agent received",
      +  "type": "string"
      +}
    • addedInput schema / properties / caller
      Added value: +{
      +  "description": "who asked, when the gate knows it: x402:<wallet address>; stored only as its sha256",
      +  "type": "string"
      +}
    • addedInput schema / properties / caller_key
      Added value: +{
      +  "description": "the customer key the reader presented to the gate (RCO-Key); the door checks it and stores sha256(\"key:\" + key id) as caller",
      +  "type": "string"
      +}
    • changedInput schema / properties / cleared_at / description
      Previous value: -"RFC 3339 UTC; the door's clock when absent"New value: +"RFC 3339 UTC; stored to the second; the door's clock when absent"
    • removedInput schema / properties / decision_id
      Removed value: -{
      -  "description": "the gate's decision id (dec_<hex>); minted here when absent",
      -  "type": "string"
      -}
    • removedInput schema / properties / gtin
      Removed value: -{
      -  "description": "the cleared object's identifier (a GTIN on goods rails; the ISIN or issuer identifier on a market door)",
      -  "type": "string"
      -}
    • changedInput schema / properties / market / description
      Previous value: -"ISO 3166-1 alpha-2 market code"New value: +"ISO country or exchange code of the read"
    • changedInput schema / properties / rule_version / description
      Previous value: -"the rule set and version the gate applied"New value: +"the rule set and version the gate cleared under"
    • addedInput schema / properties / subject
      Added value: +{
      +  "description": "what was read: the identifier (an ISIN, LEI, GTIN, ticker, record id …)",
      +  "type": "string"
      +}
    • addedInput schema / properties / subject_type
      Added value: +{
      +  "description": "isin | lei | gtin | ticker | cmr | … (open list)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "gtin",
      -  "actor_class",
      -  "rule_version"
      -]New value: +[
      +  "subject",
      +  "subject_type",
      +  "rule_version"
      +]
  3. Changed9 schema fields changed
    • addedInput schema / properties / actor_class
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / cleared_at
      Added value: +{
      +  "description": "RFC 3339 UTC; the door's clock when absent",
      +  "type": "string"
      +}
    • addedInput schema / properties / decision_id
      Added value: +{
      +  "description": "the gate's decision id (dec_<hex>); minted here when absent",
      +  "type": "string"
      +}
    • addedInput schema / properties / gtin
      Added value: +{
      +  "description": "the cleared object's identifier (a GTIN on goods rails; the ISIN or issuer identifier on a market door)",
      +  "type": "string"
      +}
    • addedInput schema / properties / market
      Added value: +{
      +  "description": "ISO 3166-1 alpha-2 market code",
      +  "type": "string"
      +}
    • removedInput schema / properties / receipt
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "properties": {
      -        "actor_class": {
      -          "description": "for which actor class (never a person)",
      -          "type": "string"
      -        },
      -        "decided_at": {
      -          "type": "string"
      -        },
      -        "decision_id": {
      -          "description": "the id the issuing door gave the decision",
      -          "pattern": "^dec_[a-f0-9]{16,40}$",
      -          "type": "string"
      -        },
      -        "issuing_door": {
      -          "type": "string"
      -        },
      -        "object": {
      -          "description": "what was cleared: a GTIN, an ISIN, a product id",
      -          "properties": {
      -            "id": {
      -              "type": "string"
      -            },
      -            "type": {
      -              "enum": [
      -                "isin",
      -                "ticker",
      -                "lei",
      -                "cmr",
      -                "gtin",
      -                "product",
      -                "identifier"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "type",
      -            "id"
      -          ],
      -          "type": "object"
      -        },
      -        "records_read": {
      -          "description": "the records read, each with its signature (or null where the record carries none)",
      -          "items": {
      -            "properties": {
      -              "as_of": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "sha256": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "signature": {
      -                "type": [
      -                  "object",
      -                  "null"
      -                ]
      -              },
      -              "url": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "url"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        },
      -        "rule": {
      -          "description": "the rule object and version the decision was made under",
      -          "properties": {
      -            "id": {
      -              "type": "string"
      -            },
      -            "version": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "version"
      -          ],
      -          "type": "object"
      -        },
      -        "signal": {
      -          "pattern": "^ACM-(000|200|300|403|404|451|500)$",
      -          "type": "string"
      -        },
      -        "signature": {
      -          "description": "the issuing door's detached JWS (EdDSA) over the receipt's canonical JSON (keys sorted, compact) without signature, signature_check, ledger, receipt_url, page",
      -          "properties": {
      -            "alg": {
      -              "type": "string"
      -            },
      -            "jws": {
      -              "type": "string"
      -            },
      -            "keyring": {
      -              "type": "string"
      -            },
      -            "kid": {
      -              "type": "string"
      -            }
      -          },
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "decision_id",
      -        "object",
      -        "actor_class",
      -        "rule",
      -        "records_read",
      -        "signal",
      -        "decided_at",
      -        "issuing_door",
      -        "signature"
      -      ],
      -      "type": "object"
      -    },
      -    {
      -      "properties": {
      -        "actor_class": {
      -          "type": "string"
      -        },
      -        "decided_at": {
      -          "type": "string"
      -        },
      -        "decision_id": {
      -          "description": "the hub gate decision id",
      -          "pattern": "^gate_[a-f0-9]{16,40}$",
      -          "type": "string"
      -        },
      -        "gtin": {
      -          "pattern": "^[0-9]{14}$",
      -          "type": "string"
      -        },
      -        "hub": {
      -          "enum": [
      -            "a2a-grocery",
      -            "a2a-cosmetics",
      -            "a2a-peptides"
      -          ],
      -          "type": "string"
      -        },
      -        "hub_signature": {
      -          "description": "the hub's detached JWS over the receipt (keys sorted, compact JSON), verified against the hub keyring",
      -          "properties": {
      -            "alg": {
      -              "type": "string"
      -            },
      -            "jws": {
      -              "type": "string"
      -            },
      -            "kid": {
      -              "type": "string"
      -            }
      -          },
      -          "type": [
      -            "object",
      -            "null"
      -          ]
      -        },
      -        "market": {
      -          "pattern": "^[A-Z]{2}$",
      -          "type": "string"
      -        },
      -        "reason_code": {
      -          "type": "string"
      -        },
      -        "record": {
      -          "description": "the gtinfetch answer the decision read: source_page, fetch_date, status, kid",
      -          "properties": {
      -            "fetch_date": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "kid": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "source_page": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "status": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            }
      -          },
      -          "type": [
      -            "object",
      -            "null"
      -          ]
      -        },
      -        "result": {
      -          "type": "string"
      -        },
      -        "rule_set": {
      -          "properties": {
      -            "id": {
      -              "type": "string"
      -            },
      -            "version": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            }
      -          },
      -          "required": [
      -            "id"
      -          ],
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "decision_id",
      -        "hub",
      -        "gtin",
      -        "market",
      -        "actor_class",
      -        "result",
      -        "reason_code",
      -        "rule_set",
      -        "decided_at"
      -      ],
      -      "type": "object"
      -    }
      -  ],
      -  "description": "a door receipt (dec_ id, x-door-key) or a hub receipt (gate_ id, x-hub-key)",
      -  "type": "object"
      -}
    • addedInput schema / properties / rule_version
      Added value: +{
      +  "description": "the rule set and version the gate applied",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "receipt"
      -]New value: +[
      +  "gtin",
      +  "actor_class",
      +  "rule_version"
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "properties": {
      -    "decision_id": {
      -      "type": "string"
      -    },
      -    "idempotent": {
      -      "type": "boolean"
      -    },
      -    "ledger": {
      -      "type": "object"
      -    },
      -    "page": {
      -      "type": "string"
      -    },
      -    "receipt_url": {
      -      "type": "string"
      -    },
      -    "written": {
      -      "type": "boolean"
      -    }
      -  },
      -  "required": [
      -    "written",
      -    "decision_id",
      -    "receipt_url",
      -    "ledger"
      -  ],
      -  "type": "object"
      -}New value: +null
  4. Changed4 schema fields changed
    • addedInput schema / properties / receipt / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "actor_class": {
      +        "description": "for which actor class (never a person)",
      +        "type": "string"
      +      },
      +      "decided_at": {
      +        "type": "string"
      +      },
      +      "decision_id": {
      +        "description": "the id the issuing door gave the decision",
      +        "pattern": "^dec_[a-f0-9]{16,40}$",
      +        "type": "string"
      +      },
      +      "issuing_door": {
      +        "type": "string"
      +      },
      +      "object": {
      +        "description": "what was cleared: a GTIN, an ISIN, a product id",
      +        "properties": {
      +          "id": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "enum": [
      +              "isin",
      +              "ticker",
      +              "lei",
      +              "cmr",
      +              "gtin",
      +              "product",
      +              "identifier"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "records_read": {
      +        "description": "the records read, each with its signature (or null where the record carries none)",
      +        "items": {
      +          "properties": {
      +            "as_of": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "sha256": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "signature": {
      +              "type": [
      +                "object",
      +                "null"
      +              ]
      +            },
      +            "url": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "url"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "rule": {
      +        "description": "the rule object and version the decision was made under",
      +        "properties": {
      +          "id": {
      +            "type": "string"
      +          },
      +          "version": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "version"
      +        ],
      +        "type": "object"
      +      },
      +      "signal": {
      +        "pattern": "^ACM-(000|200|300|403|404|451|500)$",
      +        "type": "string"
      +      },
      +      "signature": {
      +        "description": "the issuing door's detached JWS (EdDSA) over the receipt's canonical JSON (keys sorted, compact) without signature, signature_check, ledger, receipt_url, page",
      +        "properties": {
      +          "alg": {
      +            "type": "string"
      +          },
      +          "jws": {
      +            "type": "string"
      +          },
      +          "keyring": {
      +            "type": "string"
      +          },
      +          "kid": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "decision_id",
      +      "object",
      +      "actor_class",
      +      "rule",
      +      "records_read",
      +      "signal",
      +      "decided_at",
      +      "issuing_door",
      +      "signature"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "actor_class": {
      +        "type": "string"
      +      },
      +      "decided_at": {
      +        "type": "string"
      +      },
      +      "decision_id": {
      +        "description": "the hub gate decision id",
      +        "pattern": "^gate_[a-f0-9]{16,40}$",
      +        "type": "string"
      +      },
      +      "gtin": {
      +        "pattern": "^[0-9]{14}$",
      +        "type": "string"
      +      },
      +      "hub": {
      +        "enum": [
      +          "a2a-grocery",
      +          "a2a-cosmetics",
      +          "a2a-peptides"
      +        ],
      +        "type": "string"
      +      },
      +      "hub_signature": {
      +        "description": "the hub's detached JWS over the receipt (keys sorted, compact JSON), verified against the hub keyring",
      +        "properties": {
      +          "alg": {
      +            "type": "string"
      +          },
      +          "jws": {
      +            "type": "string"
      +          },
      +          "kid": {
      +            "type": "string"
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "market": {
      +        "pattern": "^[A-Z]{2}$",
      +        "type": "string"
      +      },
      +      "reason_code": {
      +        "type": "string"
      +      },
      +      "record": {
      +        "description": "the gtinfetch answer the decision read: source_page, fetch_date, status, kid",
      +        "properties": {
      +          "fetch_date": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "kid": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "source_page": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "status": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "result": {
      +        "type": "string"
      +      },
      +      "rule_set": {
      +        "properties": {
      +          "id": {
      +            "type": "string"
      +          },
      +          "version": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "decision_id",
      +      "hub",
      +      "gtin",
      +      "market",
      +      "actor_class",
      +      "result",
      +      "reason_code",
      +      "rule_set",
      +      "decided_at"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / receipt / description
      Added value: +"a door receipt (dec_ id, x-door-key) or a hub receipt (gate_ id, x-hub-key)"
    • removedInput schema / properties / receipt / properties
      Removed value: -{
      -  "actor_class": {
      -    "type": "string"
      -  },
      -  "decided_at": {
      -    "type": "string"
      -  },
      -  "decision_id": {
      -    "description": "the hub gate decision id",
      -    "pattern": "^gate_[a-f0-9]{16,40}$",
      -    "type": "string"
      -  },
      -  "gtin": {
      -    "pattern": "^[0-9]{14}$",
      -    "type": "string"
      -  },
      -  "hub": {
      -    "enum": [
      -      "a2a-grocery",
      -      "a2a-cosmetics",
      -      "a2a-peptides"
      -    ],
      -    "type": "string"
      -  },
      -  "hub_signature": {
      -    "description": "the hub's detached JWS over the receipt (keys sorted, compact JSON), verified against the hub keyring",
      -    "properties": {
      -      "alg": {
      -        "type": "string"
      -      },
      -      "jws": {
      -        "type": "string"
      -      },
      -      "kid": {
      -        "type": "string"
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  "market": {
      -    "pattern": "^[A-Z]{2}$",
      -    "type": "string"
      -  },
      -  "reason_code": {
      -    "type": "string"
      -  },
      -  "record": {
      -    "description": "the gtinfetch answer the decision read: source_page, fetch_date, status, kid",
      -    "properties": {
      -      "fetch_date": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "kid": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "source_page": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "status": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  "result": {
      -    "type": "string"
      -  },
      -  "rule_set": {
      -    "properties": {
      -      "id": {
      -        "type": "string"
      -      },
      -      "version": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "id"
      -    ],
      -    "type": "object"
      -  }
      -}
    • removedInput schema / properties / receipt / required
      Removed value: -[
      -  "decision_id",
      -  "hub",
      -  "gtin",
      -  "market",
      -  "actor_class",
      -  "result",
      -  "reason_code",
      -  "rule_set",
      -  "decided_at"
      -]
  5. First observed

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the write/idempotent/safe profile is structured data rather than description value. The description does add that this is an internal system-to-system call and 'one receipt per cleared read', which corroborates the idempotent hint. It says nothing about duplicate handling, error behavior, or the fact that caller identity is hashed before storage (that lives only in the schema).

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?

Two short sentences, the caller/trigger context front-loaded, with no filler. The second sentence ('One receipt per cleared read') is close to redundant with the idempotent annotation but earns a small amount of place by clarifying the write model.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is an 8-parameter write tool with no output schema, and the description says nothing about what a successful call returns (receipt id? echo of the stored fields?) or what happens when a receipt already exists for the same subject and rule_version. For a mutation tool invoked inside an automated gate, that is a meaningful gap in an otherwise rich schema.

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 one of the 8 parameters (caller, subject, rule_version, answer_hash, etc.) already carries its own explanation and baseline 3 applies. The description adds no format hints, defaults, or relationships between parameters such as caller vs caller_key.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description conveys that this tool writes a receipt for a cleared read and that it is invoked by Allooloo's own MCPs, which gives a domain-specific picture of the action. However, it never states a direct verb+object (e.g. 'record a clearance receipt') and does nothing to distinguish it from siblings like verify_receipt or list_receipts, leaving the agent to infer the distinction from names 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?

'Called by Allooloo's own MCPs when a read is cleared' gives a triggering condition, so usage is implied rather than left blank. It stops short of stating whether an external agent should ever call it, whether there are cases to avoid it, or how it relates to verify_receipt/list_receipts, so the guidance is only partial.

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.