Skip to main content
Glama

expense_update

Edits an expense's own fields only — status and approval stamps refuse with VALIDATION_ERROR here since those are transitions (expense_submit, expense_approve, expense_reject, expense_reimburse). amount_cents, if changed, must stay integer CENTS. Only the expense's own creator may edit it, and content freezes once the row is 'pending', reimbursed, or approved by someone else — draft, rejected, and your own self-approved rows stay editable.

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": {
      "id": "<id>"
    },
    "name": "expense_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe expense id (expense_list shows them).
notesNo
statusNo
vendorNo
currencyNo
ocr_jsonNo
tax_typeNo
tags_jsonNo
approved_atNo
approved_byNo
category_idNo
receipt_keyNo
rejected_atNo
amount_centsNo
expense_dateNo
submitted_atNo
tax_rate_bpsNo
recurrence_idNo
reimbursed_atNo
subtotal_centsNo
rejection_reasonNo
tax_amount_centsNo
expected_updated_atNoOptional compare-and-set guard: the updated_at you last read. Mismatch returns CONFLICT with the current value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the generic non-read/non-destructive/non-idempotent profile; the description adds the real behavioral substance: which field groups refuse with VALIDATION_ERROR, the creator-only authorization rule, and the exact freeze conditions (pending, reimbursed, or approved by someone else) versus states that remain editable.

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 scope distinction, then the error/alternative rule, then units, then permissions and freeze states — a sensible order with no filler. The final sentence is a long compound clause packing three separate states, which slightly taxes parsing.

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 23-parameter mutation with no output schema, it covers the high-risk items an agent would otherwise get wrong: authorization, state-based editability, and the transition-vs-edit split. It does not say whether unspecified fields are left untouched (partial update semantics), which is the main remaining ambiguity for a 23-param update.

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 9% across 23 parameters, so the description must compensate. It does add critical meaning for two traps — the present-but-refused status/approval fields and the cents-integer unit for amount_cents — but leaves currency, tax fields, tags_json/ocr_json, and timestamp fields entirely unexplained in both places.

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?

States a specific verb and resource and immediately narrows scope: "Edits an expense's own fields only." The parenthetical listing of the transition siblings (expense_submit, expense_approve, expense_reject, expense_reimburse) makes the boundary against neighboring tools unmistakable.

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?

Explicitly names what is rejected here (status and approval stamps, with the VALIDATION_ERROR outcome) and routes those cases to the correct alternative tools by name. It also states the caller precondition (creator-only) and the row-state conditions under which editing is permitted versus frozen.

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