Skip to main content
Glama
Unofficial Lexware Office MCP Server

Unofficial Lexware Office MCP Server

create_voucher

Records a bookkeeping voucher in Lexware Office by posting document lines with categories, tax type, and voucher number. It is booked immediately and cannot be deleted through the API.

Instructions

Record a bookkeeping voucher in the account.

Writes real accounting data, and the API cannot take it back: there is no way to delete a voucher here. Correcting one is a job for the web app. Confirm the organization with get_profile first. One API call, never retried.

Every line needs a posting category id, from get_master_data with kind 'posting-categories'. Totals are added up from the lines unless stated. It is booked immediately and no status can be asked for. To record a receipt for review instead, use upload_file, which files it as an unchecked purchase invoice. Answers with the new id and version.

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_type": "<voucher_type>",
      "voucher_date": "<voucher_date>",
      "tax_type": "<tax_type>",
      "items": "<items>",
      "voucher_number": "<voucher_number>"
    },
    "name": "create_voucher"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesThe lines this voucher books. Every line names the posting category it belongs to. At least one is required.
remarkNoA note kept with the voucher.
due_dateNoWhen payment is due, as YYYY-MM-DD.
tax_typeYes'gross' means the line amounts include tax, 'net' means they do not, 'vatfree' means there is none. The API checks the lines against this and refuses a mismatch.
contact_idNoThe customer or vendor this belongs to, by id from search_contacts. Leave unset to book against the collective contact instead of a named one.
voucher_dateYesThe date on the document, as YYYY-MM-DD.
voucher_typeYesWhat is being booked: a sales invoice or credit note is money owed to the account, a purchase invoice or credit note is money the account owes.
shipping_dateNoDelivery or service date, as YYYY-MM-DD.
voucher_numberYesThe number on the document being recorded, for example the supplier's invoice number. Required by the API for every voucher type.
total_tax_amountNoThe total tax. Also added up from the lines if unset.
total_gross_amountNoThe total including tax. Leave unset to have it added up from the lines, which is what the API expects it to equal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed31 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 / 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 / items / title
      Removed value: -"Items"
    • 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 / shipping_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / shipping_date / title
      Removed value: -"Shipping Date"
    • addedInput schema / properties / shipping_date / type
      Added value: +"string"
    • removedInput schema / properties / tax_type / title
      Removed value: -"Tax Type"
    • 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 / voucher_date / title
      Removed value: -"Voucher Date"
    • removedInput schema / properties / voucher_number / title
      Removed value: -"Voucher Number"
    • removedInput schema / properties / voucher_type / title
      Removed value: -"Voucher Type"
    • removedInput schema / title
      Removed value: -"create_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 only say readOnly=false, idempotent=false, destructive=false; the description goes well beyond that by disclosing that created data is irreversible ('the API cannot take it back'), that the call is never retried, that booking is immediate with no status to poll, and that the tax_type is validated against the lines and a mismatch is refused. It also states the response shape ('the new id and version'), which annotations cannot convey.

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?

Front-loaded with the irreversible-write warning, which is the right priority, and the prerequisite chain follows in logical order. A few sentences restate schema content, notably 'Totals are added up from the lines unless stated' duplicating the total_gross_amount/total_tax_amount descriptions, and the 'no status' point is made in two places.

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 an 11-parameter irreversible mutation with no output schema, the description covers the safety profile, the prerequisite tool calls, the alternative tool, the line-level requirement, and the return value (new id and version). Nothing an agent needs before invoking it is left unstated.

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, but the description adds cross-tool provenance for the key inputs (category id from get_master_data, contact from search_contacts) and clarifies total accumulation from the lines. It does not add format or validation detail beyond the schema for the remaining fields, so it sits just above baseline rather than fully compensating.

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 ('Record a bookkeeping voucher in the account') and immediately delimits it from siblings by contrasting with upload_file ('files it as an unchecked purchase invoice') and by saying corrections belong to the web app. An agent can tell this apart from update_voucher or upload_file without opening any schema.

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 explicit prerequisites and sequencing: confirm the organization with get_profile first, fetch posting category ids from get_master_data with kind 'posting-categories'. It also names an alternative path ('To record a receipt for review instead, use upload_file') and states that correcting a voucher is out of scope for this tool, which is exactly when-not-to-use guidance.

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