Skip to main content
Glama
Unofficial Lexware Office MCP Server

Unofficial Lexware Office MCP Server

create_sales_document

Creates invoices, quotations, credit notes, and related sales documents in Lexware Office, with optional finalization, so you can draft or issue customer documents via the MCP server.

Instructions

Create an invoice, quotation, credit note or one of their relatives.

Writes to the account. One API call, never retried, so a failure that might have gone through has to be checked with search_vouchers.

A draft can still be edited or deleted in the web app. finalize issues it instead and the API cannot take that back. Set it only when the user asked to issue the document, never on your own initiative.

For a purchase or a receipt, which is a bookkeeping record, use create_voucher. Answers with the new id and version, not the document.

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": {
      "document_type": "<document_type>",
      "contact_id": "<contact_id>",
      "voucher_date": "<voucher_date>",
      "items": "<items>"
    },
    "name": "create_sales_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesThe lines of the document.
titleNoHeading. The account's default is used if unset.
remarkNoText below the lines.
confirmNoRequired only for finalize. Ignored otherwise.
currencyNoISO currency code.EUR
finalizeNoIssue it instead of drafting it. Only when the user asked for that. Needs confirm.
tax_typeNoWhether the line prices are before or after tax. 'vatfree' is for a document that carries none.net
contact_idYesWho the document is for, by id from search_contacts. A one-time address is not supported: create the contact.
introductionNoText above the lines.
voucher_dateYesThe date on the document, as YYYY-MM-DD.
document_typeYesWhat to create. A down payment invoice cannot be created through the API at all.
shipping_dateNoWhen it was delivered or performed, as YYYY-MM-DD. Required for an invoice, order confirmation and delivery note.
expiration_dateNoHow long a quotation stands, as YYYY-MM-DD. Required for one.
preceding_sales_voucher_idNoThe finalized document this one follows, for example the quotation an invoice comes from. Required for a dunning.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed57 schema fields changedv0.11.0
    • changedInput schema / $defs / SalesLineItem / description
      Previous value: -"One line of a sales document.\n\nThe price is one number, and which side it is comes from the document's\ntax type rather than from the line: a `net` document carries net line\nprices throughout. The API adds the totals up itself, so nothing here is\nsummed."New value: +"One line of a sales document."
    • removedInput schema / $defs / SalesLineItem / properties / article_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / SalesLineItem / properties / article_id / title
      Removed value: -"Article Id"
    • addedInput schema / $defs / SalesLineItem / properties / article_id / type
      Added value: +"string"
    • removedInput schema / $defs / SalesLineItem / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / SalesLineItem / properties / description / title
      Removed value: -"Description"
    • addedInput schema / $defs / SalesLineItem / properties / description / type
      Added value: +"string"
    • removedInput schema / $defs / SalesLineItem / properties / discount_percentage / anyOf
      Removed value: -[
      -  {
      -    "maximum": 100,
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / $defs / SalesLineItem / properties / discount_percentage / maximum
      Added value: +100
    • addedInput schema / $defs / SalesLineItem / properties / discount_percentage / minimum
      Added value: +0
    • removedInput schema / $defs / SalesLineItem / properties / discount_percentage / title
      Removed value: -"Discount Percentage"
    • addedInput schema / $defs / SalesLineItem / properties / discount_percentage / type
      Added value: +"number"
    • removedInput schema / $defs / SalesLineItem / properties / item_type / title
      Removed value: -"Item Type"
    • removedInput schema / $defs / SalesLineItem / properties / name / title
      Removed value: -"Name"
    • removedInput schema / $defs / SalesLineItem / properties / quantity / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / $defs / SalesLineItem / properties / quantity / minimum
      Added value: +0
    • removedInput schema / $defs / SalesLineItem / properties / quantity / title
      Removed value: -"Quantity"
    • addedInput schema / $defs / SalesLineItem / properties / quantity / type
      Added value: +"number"
    • removedInput schema / $defs / SalesLineItem / properties / tax_rate_percent / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / $defs / SalesLineItem / properties / tax_rate_percent / minimum
      Added value: +0
    • removedInput schema / $defs / SalesLineItem / properties / tax_rate_percent / title
      Removed value: -"Tax Rate Percent"
    • addedInput schema / $defs / SalesLineItem / properties / tax_rate_percent / type
      Added value: +"number"
    • removedInput schema / $defs / SalesLineItem / properties / unit_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / SalesLineItem / properties / unit_name / title
      Removed value: -"Unit Name"
    • addedInput schema / $defs / SalesLineItem / properties / unit_name / type
      Added value: +"string"
    • removedInput schema / $defs / SalesLineItem / properties / unit_price / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / $defs / SalesLineItem / properties / unit_price / minimum
      Added value: +0
    • removedInput schema / $defs / SalesLineItem / properties / unit_price / title
      Removed value: -"Unit Price"
    • addedInput schema / $defs / SalesLineItem / properties / unit_price / type
      Added value: +"number"
    • removedInput schema / $defs / SalesLineItem / title
      Removed value: -"SalesLineItem"
    • removedInput schema / properties / confirm / title
      Removed value: -"Confirm"
    • removedInput schema / properties / contact_id / title
      Removed value: -"Contact Id"
    • removedInput schema / properties / currency / title
      Removed value: -"Currency"
    • removedInput schema / properties / document_type / title
      Removed value: -"Document Type"
    • removedInput schema / properties / expiration_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / expiration_date / title
      Removed value: -"Expiration Date"
    • addedInput schema / properties / expiration_date / type
      Added value: +"string"
    • removedInput schema / properties / finalize / title
      Removed value: -"Finalize"
    • removedInput schema / properties / introduction / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / introduction / title
      Removed value: -"Introduction"
    • addedInput schema / properties / introduction / type
      Added value: +"string"
    • removedInput schema / properties / items / title
      Removed value: -"Items"
    • removedInput schema / properties / preceding_sales_voucher_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / preceding_sales_voucher_id / title
      Removed value: -"Preceding Sales Voucher Id"
    • addedInput schema / properties / preceding_sales_voucher_id / type
      Added value: +"string"
    • 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 / title / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / title / title
      Removed value: -"Title"
    • addedInput schema / properties / title / type
      Added value: +"string"
    • removedInput schema / properties / voucher_date / title
      Removed value: -"Voucher Date"
    • removedInput schema / title
      Removed value: -"create_sales_documentArguments"
  2. Addedv0.8.4

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false) by disclosing that the call is never retried, that a possibly-successful failed call must be reconciled via `search_vouchers`, that drafts remain editable/deletable in the web app, and that finalizing is irreversible through the API. That is exactly the operational context annotations cannot convey for a non-idempotent write.

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?

Six short sentences, each carrying distinct load: creation scope, write/retry semantics, draft vs. finalize, irreversibility warning, and the sibling alternative. The most consequential warning (finalize) is emphasized and front-loaded before the alternative routing at the end.

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 14-parameter, non-idempotent write tool with no output schema, the description covers what annotations and schema cannot: retry behavior, failure reconciliation, irreversibility, and the return value (new id and `version`, not the document). Nothing an agent needs in order to call this safely is missing.

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 and the schema already documents all 14 parameters thoroughly, including enums and conditional requirements. The description adds genuine meaning only for `finalize` and `confirm`, framing them as user-intent-gated and irreversible rather than mere booleans.

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 ("Create an invoice, quotation, credit note or one of their relatives") and immediately contrasts itself with the sibling `create_voucher` for purchases and receipts. An agent can distinguish this from `create_voucher`, `update_voucher` and `get_sales_document` 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?

States both the positive case and the exclusions: use this for invoices/quotations/credit notes, use `create_voucher` for purchases and receipts, and set `finalize` only when the user explicitly asked to issue the document. It also tells the agent what to do after an ambiguous failure, namely verify with `search_vouchers`.

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