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 | paid | canceled). Never set a draft to issued here: finalize a draft with well_issue_invoice. A status change to issued on a draft is refused.

  • 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.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.
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
linesNo
statusNo
sourcesNoThe tools that hold a copy of the invoice, highest source precedence first. Empty when no tool holds it.
successYes
currencyNo
invoice_idNo
issue_dateNo
grand_totalNo
source_countNoHow many tools hold the invoice; sources may list fewer.
customer_nameNo
design_layoutNo
fx_conversionNo
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
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. Changed2 schema fields changed
    • addedOutput schema / properties / source_count
      Added value: +{
      +  "description": "How many tools hold the invoice; sources may list fewer.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / sources
      Added value: +{
      +  "description": "The tools that hold a copy of the invoice, highest source precedence first. Empty when no tool holds it.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "domain": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "kind": {
      +        "enum": [
      +          "accounting_tool",
      +          "connector",
      +          "mail_extraction"
      +        ],
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "service_id",
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  3. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  5. Changed1 schema field changed
    • addedOutput schema / properties / lines / items / properties / line_kind
      Added value: +{
      +  "description": "Whether the line is charged. Only a billed line counts toward grand_total; an optional or alternative line is printed with its price but not charged. Its line_id still names it in an edit.",
      +  "enum": [
      +    "billed",
      +    "optional",
      +    "alternative"
      +  ],
      +  "type": "string"
      +}
  6. Changed8 schema fields changed
    • addedOutput schema / properties / currency
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / customer_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / design_layout
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / fx_conversion
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "from_currency": {
      +      "type": "string"
      +    },
      +    "rate": {
      +      "type": "string"
      +    },
      +    "rate_date": {
      +      "type": "string"
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "to_currency": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "from_currency",
      +    "to_currency",
      +    "rate",
      +    "rate_date",
      +    "source"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / grand_total
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / issue_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / lines
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "line_id": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "quantity": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "tax_rate": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "unit_price": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "quantity",
      +      "unit_price",
      +      "tax_rate"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  7. 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"
      +}
  8. 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"
      +  }
      +]
  9. 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."
  10. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources