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
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
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
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
reference_numberNo
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_note
      Added value: +{
      +  "description": "Present only when the server opened a fresh lane, stating that no choice recorded earlier was read.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_source
      Added value: +{
      +  "description": "Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.",
      +  "enum": [
      +    "host_meta",
      +    "argument",
      +    "minted"
      +  ],
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / description / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 2000,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 255,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / terms / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 1000,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 300,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / workspace_id / description
      Previous value: -"Target workspace. Omit to use the only authorized workspace, or (for read tools) to query all authorized workspaces grouped by workspace. Required for write tools when the token authorizes more than one workspace."New value: +"Target 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."
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag the operation as destructive and non-read-only; the description adds useful behavioral detail: null clears a field, omitted fields remain unchanged, and several invoice components are immutable. This meaningfully extends beyond what the annotations alone convey.

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?

The description is well-structured: summary, schema discovery hint, required parameter, optional parameter list, then unsupported fields. Every line carries actionable information, and the hierarchy makes it easy to scan.

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 tool's 20 parameters, the schema and output schema carry substantial information. The description covers the key invocation logic, partial-update semantics, and exclusions. Conditional requirements such as workspace_id are only in schema descriptions, but those descriptions are thorough, so the overall package is complete enough.

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?

Schema coverage is 100%, so the baseline is 3. The description adds value by grouping parameters into required vs. optional, clarifying null/omit semantics for issuer_company_id and receiver_company_id, and supplying concrete enum examples. Some nuances are left to the schema, but the description compensates well.

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 description starts with a specific verb and resource: 'Update an existing invoice in Well.' It clearly distinguishes this from create/delete siblings by focusing on existing invoices and by explicitly stating what cannot be changed (line items, payment_means, document attachment).

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 action-oriented guidance: call well_get_schema('invoices') to discover fields, pass only fields you want changed, and avoid unsupported fields. It does not explicitly name alternative tools or say 'use X instead,' but the context makes the intended use clear.

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