Skip to main content
Glama

Update invoice

well_update_invoice
Destructive

Update an existing invoice in Well.

Call well_get_schema("invoices") to discover all available fields.

REQUIRED: invoice_id OPTIONAL (only pass fields you want changed):

  • reference_number, issue_date (ISO date), due_date (ISO date)

  • status (draft | issued | paid | canceled)

  • terms, description

  • grand_total, items_total, tax_total (numbers)

  • local_currency (ISO 4217 three-letter code, e.g. "EUR", "USD")

  • document_type_code (UN/CEFACT 1001 code, e.g. "380")

  • billing_context (e.g. subscription, one_time, project, ...)

  • issuer_company_id / receiver_company_id (uuid to set, null to clear, omit to leave unchanged)

Cannot change line items, payment_means, or document attachment via this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termsNoPayment terms text; pass null to clear
statusNoInvoice lifecycle status
due_dateNoPayment due date (ISO 8601); pass null to clear
tax_totalNoTotal tax amount; pass null to clear
invoice_idYesThe UUID of the invoice to update
issue_dateNoIssue date (ISO 8601, e.g. 2026-04-27); pass null to clear
descriptionNoFree-form description; pass null to clear
grand_totalNoTotal invoice amount including tax; pass null to clear
items_totalNoSum of line items before tax; pass null to clear
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which.
local_currencyNoISO 4217 three-letter currency code (e.g. EUR, USD); pass null to clear
payment_statusNoUser-driven payment_status override — requires override_version (CAS)
billing_contextNoBilling context / business model; pass null to clear
idempotency_keyNoOptional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation.
override_versionNoRequired when payment_status is present — current override_version for CAS
reference_numberNoInvoice reference number (e.g. INV-2026-001); pass null to clear
issuer_company_idNoIssuer company UUID. Omit = no change, null = clear, uuid = set.
document_type_codeNoUN/CEFACT 1001 document type code (e.g. 380 for commercial invoice); pass null to clear
receiver_company_idNoReceiver company UUID. Omit = no change, null = clear, uuid = set.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
successYes
invoice_idNo
reference_numberNo

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark this as destructive and not read-only. The description adds meaningful behavior beyond that: partial-update semantics ('only pass fields you want changed'), the need to consult the schema for available fields, and the hard limitation on line items/payment_means/attachments. No contradiction with annotations.

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?

The description is front-loaded with a one-sentence purpose, then uses compact bullets, required/optional grouping, and a decisive limitation statement. It is long because there are many fields, but the structure makes it scannable and every section earns its place.

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?

Given the complexity of 19 parameters, the schema carries full descriptions and an output schema exists, so the description focuses on workflow and constraints. It covers discovery via well_get_schema and key invariants. It doesn't summarize edge-case params like workspace_id or idempotency_key, but those are fully documented in the schema and the agent is directed to the schema.

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?

All 19 parameters have schema descriptions, so the baseline is 3. The description adds selection semantics not fully encoded in the schema: REQUIRED vs OPTIONAL, 'only pass fields you want changed,' and explicit set/clear/omit rules for company IDs. This genuinely helps an agent construct a correct partialupdate call.

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?

The first sentence states a specific action and resource: 'Update an existing invoice in Well.' This clearly distinguishes it from create/delete invoice siblings, and the closing restriction on line items, payment_means, and attachments further sharpens the scope.

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?

Provides concrete usage guidance: call well_get_schema to discover fields, only pass fields you want changed, and explicitly lists what cannot be changed. It does not name an alternative tool for those excluded changes, but the exclusion is clear enough for routing.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: CRUD for companies, people, and invoices; financial analytics (cash, cost, runway, holdings); connector management and invocation; schema discovery; querying; reconciliation; and contact channel management. No two tools could be confused for the same action.

Naming Consistency5/5

All tools follow the `well_verb_noun` pattern with consistent verb choices (create, get, list, update, delete, add, remove, run, resolve, query, invoke). The naming is predictable and makes the tool's purpose immediately clear.

Tool Count4/5

With 26 tools, the set is slightly above the ideal 3-15 range, but every tool earns its place given the breadth of the domain (CRM, invoicing, financial analytics, reconciliation, connector management). The count is well-scoped and not excessive.

Completeness4/5

The tool surface covers core CRUD, financial KPIs, reconciliation, and connector management. Minor gaps exist (e.g., no direct tool to update contact channels or manage accounts), but the query and schema tools allow agents to work around them, and the primary workflows are fully supported.

Resources