Skip to main content
Glama
Unofficial Lexware Office MCP Server

Unofficial Lexware Office MCP Server

update_voucher

DestructiveIdempotent

Change a recorded bookkeeping voucher by ID: edit fields, replace all lines, or finalize an unchecked voucher; the required version prevents overwriting newer changes.

Instructions

Change a bookkeeping voucher that is already recorded.

Writes real accounting data. Read it with get_voucher first: it shows what is there and carries the version this needs. Two API calls. Passing items replaces every line rather than adding one.

An unchecked voucher takes new data and stays unchecked until finalize books it, which needs its number, date, contact and lines.

One that is already paid or booked may be refused whatever the version. Answers with the id and the new version, which the next update needs.

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": {
      "voucher_id": "<voucher_id>",
      "version": "<version>"
    },
    "name": "update_voucher"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNoReplaces every line on the voucher. The totals are recomputed to match unless you state them.
remarkNoNew note.
confirmNoRequired only for finalize. Ignored otherwise.
versionYesThe `version` from the record as you last read it. If the record has changed since, the update is refused instead of overwriting that change.
due_dateNoNew due date, as YYYY-MM-DD.
finalizeNoBook an unchecked voucher, such as one upload_file made, by moving it to open. Only when the user asked for that. Needs confirm.
contact_idNoMove it to a different contact, by id.
voucher_idYesThe voucher's Lexware id, as returned by search_vouchers. Not the voucher number a human reads off the document.
voucher_dateNoNew document date, as YYYY-MM-DD.
voucher_numberNoNew document number.
total_tax_amountNoNew total tax.
total_gross_amountNoNew total including tax.
use_collective_contactNoTrue moves it to the collective contact instead of a named one. Not together with contact_id. To leave the collective contact, pass contact_id instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed41 schema fields changedv0.11.0
    • changedInput schema / $defs / VoucherItem / description
      Previous value: -"One line of a bookkeeping voucher.\n\nThe API checks these against the voucher's totals and refuses a mismatch\nwith ``totalGrossAmount: invalid_total_amount``. It also checks the tax\nagainst the tax type: with ``net`` the amount is net and a gross figure is\nrefused as ``voucherItems[0].taxAmount: invalid_taxamount``. Verified\n2026-08-20."New value: +"One line of a bookkeeping voucher."
    • removedInput schema / $defs / VoucherItem / properties / amount / title
      Removed value: -"Amount"
    • changedInput schema / $defs / VoucherItem / properties / category_id / description
      Previous value: -"The posting category this line books to, from get_master_data with kind 'posting-categories'. Not a name, the category's id."New value: +"The posting category's id, not its name."
    • removedInput schema / $defs / VoucherItem / properties / category_id / title
      Removed value: -"Category Id"
    • removedInput schema / $defs / VoucherItem / properties / tax_amount / title
      Removed value: -"Tax Amount"
    • removedInput schema / $defs / VoucherItem / properties / tax_rate_percent / title
      Removed value: -"Tax Rate Percent"
    • removedInput schema / $defs / VoucherItem / title
      Removed value: -"VoucherItem"
    • removedInput schema / properties / confirm / title
      Removed value: -"Confirm"
    • removedInput schema / properties / contact_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / contact_id / title
      Removed value: -"Contact Id"
    • addedInput schema / properties / contact_id / type
      Added value: +"string"
    • removedInput schema / properties / due_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / due_date / title
      Removed value: -"Due Date"
    • addedInput schema / properties / due_date / type
      Added value: +"string"
    • removedInput schema / properties / finalize / title
      Removed value: -"Finalize"
    • removedInput schema / properties / items / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "$ref": "#/$defs/VoucherItem"
      -    },
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / items / items
      Added value: +{
      +  "$ref": "#/$defs/VoucherItem"
      +}
    • addedInput schema / properties / items / minItems
      Added value: +1
    • removedInput schema / properties / items / title
      Removed value: -"Items"
    • addedInput schema / properties / items / type
      Added value: +"array"
    • removedInput schema / properties / remark / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / remark / title
      Removed value: -"Remark"
    • addedInput schema / properties / remark / type
      Added value: +"string"
    • removedInput schema / properties / total_gross_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / total_gross_amount / title
      Removed value: -"Total Gross Amount"
    • addedInput schema / properties / total_gross_amount / type
      Added value: +"number"
    • removedInput schema / properties / total_tax_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / total_tax_amount / title
      Removed value: -"Total Tax Amount"
    • addedInput schema / properties / total_tax_amount / type
      Added value: +"number"
    • removedInput schema / properties / use_collective_contact / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / use_collective_contact / title
      Removed value: -"Use Collective Contact"
    • addedInput schema / properties / use_collective_contact / type
      Added value: +"boolean"
    • removedInput schema / properties / version / title
      Removed value: -"Version"
    • removedInput schema / properties / voucher_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / voucher_date / title
      Removed value: -"Voucher Date"
    • addedInput schema / properties / voucher_date / type
      Added value: +"string"
    • removedInput schema / properties / voucher_id / title
      Removed value: -"Voucher Id"
    • removedInput schema / properties / voucher_number / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / voucher_number / title
      Removed value: -"Voucher Number"
    • addedInput schema / properties / voucher_number / type
      Added value: +"string"
    • removedInput schema / title
      Removed value: -"update_voucherArguments"
  2. Addedv0.8.4

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive and idempotent, but the description adds what they cannot: the call costs two API requests, passing `items` replaces every line rather than appending, an unchecked voucher stays unchecked until finalize, and paid/booked vouchers may be refused regardless of version. It also discloses the return payload (id plus new version), which is the only source of that information since there is no output schema.

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?

Short paragraphs, purpose front-loaded, and each sentence carries a distinct fact — the two-call cost, the replacement semantics, the finalize chain, the version return. Slightly long for the payload but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter mutation with no output schema, the description covers the prerequisite read, the version round-trip, the replacement hazard, the finalize path, and the return value. An agent has everything needed to call it correctly without opening 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?

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining why `version` matters (the update is refused rather than overwriting a concurrent change), that finalize needs confirm, and that use_collective_contact is mutually exclusive with contact_id. Much of the items/confirm wording restates the schema, so it stops short of 5.

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?

Opens with a specific verb and resource — 'Change a bookkeeping voucher that is already recorded' — which immediately separates it from create_voucher and from read-only get_voucher. The scope ('already recorded') is stated in the first clause, so an agent knows this is a mutation of an existing record.

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?

Gives an explicit prerequisite and named alternative: 'Read it with get_voucher first: it shows what is there and carries the version this needs.' It also states when-not behaviour ('One that is already paid or booked may be refused whatever the version') and conditions finalize on user intent ('Only when the user asked for that'), which is real routing guidance rather than inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.