Skip to main content
Glama

Edit expense

update_expense
Destructive

Edit an existing expense (gasto) by id. Only the fields you pass are changed. Gastos are not part of the Verifactu chain, so editing is safe. Use list_expenses to find the id. Returns the updated expense's id, description and total.

Input Schema

NameRequiredDescriptionDefault
notesNo
totalNo
categoryNoexpense category slug (see web app)
subtotalNo
tax_rateNo
tax_linesNoOnly for a receipt carrying MORE THAN ONE VAT rate (e.g. a Correos ticket: 21% on postage, exempt on the stamp). One entry per rate. When given, subtotal/tax_amount/tax_rate/total are derived from it, do not compute them yourself. Passing a list REPLACES the existing blocks; an empty list removes them. Leave it out to keep them unchanged.
expense_idYesexpense id from list_expenses
tax_amountNo
descriptionNo
supplier_idNoexisting supplier id from list_suppliers
invoice_dateNoYYYY-MM-DD
supplier_nifNosupplier NIF/CIF/VAT as printed on the document
is_deductibleNofalse keeps the expense out of the deductible totals entirely
supplier_nameNosupplier (proveedor) name, matched against existing suppliers by NIF or name, created if new
invoice_numberNo
reverse_chargeNoinversión del sujeto pasivo, as stated by the user
supplier_countryNosupplier country, ISO-2 (ES, FR, DE...). Drives Modelo 349 intra-EU acquisitions
deductible_percentNoporcentaje imputable: share of this expense (0-100) the user allocates to the business, e.g. a shared car or a home office. Enter the FULL receipt amounts in subtotal/tax_amount/total and the percentage here, not pre-reduced amounts; the IVA and income-tax modelos count only that share. Default 100. Use only a percentage the user states, contix never proposes one.
reverse_charge_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag the write/destructive nature, so the description correctly focuses on what annotations can't convey: partial-update behavior, the fact that edits do not touch the Verifactu chain, and the returned fields. That is genuinely useful context beyond the schema. Minor gap: no mention of permission requirements or reversal options.

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?

Four short sentences, front-loaded with the core action and no filler. The safety note and return-value sentence each earn their place. The only slight redundancy is the parenthetical "(gasto)" translation.

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 19-parameter mutation with no output schema, the description covers the essentials: partial-update behavior, id sourcing, side-effect safety, and the shape of the return value. Given the rich per-parameter schema descriptions, remaining gaps (permissions, failure modes) are minor.

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 coverage is 58%, so a baseline of 3 applies. The description adds the key cross-parameter semantic (only supplied fields change), but contributes no detail on the tax-heavy parameters (tax_lines, deductible_percent, reverse_charge) that the schema already documents.

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?

States a specific verb (edit) and resource (expense/gasto), plus a scope qualifier: only passed fields change, and it returns id/description/total. Sibling relationships are implied (list_expenses for ids, edit vs create/delete by name) rather than explicitly differentiated.

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?

Gives a prerequisite ("Use list_expenses to find the id") and clarifies partial-update semantics, which helps an agent call it correctly. But it never says when to choose this over create_expense, delete_expense, or the gestoria expense tools, so guidance is implied rather than explicit.

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