Skip to main content
Glama

Update receipt

update_receipt
Destructive

Fix one of the caller's receipts by id (recognition mistakes). Editable header fields: date, merchant_name (re-resolved), total, currency, category, payment_method, document_id, notes. Pass 'items_replace' (a full new list of line items, same shape as add_receipt.items) to fully REPLACE the existing line items. The confirmed/needs_review status is recomputed from the resulting items vs total. Only the caller's own receipt is reachable. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.

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": {
      "receipt_id": "<receipt_id>"
    },
    "name": "update_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNo
notesNo
totalNo
categoryNo
currencyNo
receipt_idYes
document_idNo
items_replaceNo
merchant_nameNo
payment_methodNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the destructiveHint/readOnlyHint annotations: items_replace fully REPLACES rather than merges, status is recomputed from items vs total, only the caller's receipt is reachable, and the call is PROPOSED-only returning status='confirmation_required' with action_id and plan_token until confirm_action is called. That is exactly the non-obvious behavior an agent needs before attempting a destructive edit.

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?

Four dense sentences, front-loaded with purpose, then fields, then the replace semantic, then the confirmation protocol. The emphasis markers (REPLACE, PROPOSED, CONFIRMATION) are placed on the two facts most likely to cause a wrong call, and nothing is 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 10-parameter destructive mutation with no annotations beyond hints and no output schema, the description covers ownership scope, replace-vs-merge, derived status, and the two-step confirmation return shape. The remaining gap is partial-update semantics: it never states whether omitted fields are left unchanged, which matters for a patch-style endpoint.

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?

With 0% schema description coverage, the description carries the load and does so for most of the 10 parameters, adding real meaning: merchant_name is re-resolved, items_replace takes a full list matching add_receipt.items and replaces rather than appends, notes/category/payment_method are plain header edits. It does not explain the enum values, currency maxLength, the unit enums on line items, or the string|integer flexibility of receipt_id.

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?

Opens with a specific verb and resource -- fix a receipt by id -- and immediately frames the intended use case (recognition mistakes), then enumerates the editable header fields. An agent can tell this apart from add_receipt (items_replace references its items shape) and get_receipt/delete_receipt without opening any schema.

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

Usage Guidelines4/5

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

Gives a clear trigger ('fix ... recognition mistakes') and scopes reachability to 'the caller's own receipt'. It also routes the agent through confirm_action rather than expecting a direct write. It stops short of explicitly naming when to prefer a sibling (e.g. delete_receipt or a re-add) instead.

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.

Resources