Skip to main content
Glama
Unofficial Lexware Office MCP Server

Unofficial Lexware Office MCP Server

get_sales_document

Read-only

Retrieve a complete sales document such as an invoice or quotation by document type and ID, including recipient, line items, totals, tax breakdown, and version.

Instructions

Read one sales document in full: an invoice, quotation or their kin.

One API call. Returns the recipient, the line items with their unit prices, the totals, the tax breakdown and the version.

document_type has to match the id. A mismatch answers "not found", exactly as a wrong id does.

A draft reads in full with voucherStatus draft: nothing has been rendered yet, and download_document refuses it.

For a bookkeeping voucher use get_voucher.

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>",
      "document_id": "<document_id>"
    },
    "name": "get_sales_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYesThe document's Lexware id, as returned by search_vouchers.
document_typeYesWhich kind of document this is. Take it from the `voucherType` search_vouchers reported, where a sales invoice is 'invoice'. Either spelling works, 'creditnote' or 'credit-note'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.11.0
    • removedInput schema / properties / document_id / title
      Removed value: -"Document Id"
    • removedInput schema / properties / document_type / title
      Removed value: -"Document Type"
    • removedInput schema / title
      Removed value: -"get_sales_documentArguments"
  2. Addedv0.8.3

TDQS

A4.6/5.0
Behavior4/5

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

Beyond readOnlyHint=true, the description discloses cost ("One API call"), the returned payload (recipient, line items, totals, tax, version), and non-obvious failure semantics: an id/type mismatch returns "not found" indistinguishably from a bad id. It does not cover auth requirements or pagination, but for a single-read tool that is minor.

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 verb and payload summary, then constraints and alternatives in short blocks. A few flourishes ("or their kin", "nothing has been rendered yet") cost a little density but each block still carries distinct information.

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?

Two required params are fully documented, there is no output schema, and the description compensates by enumerating the returned fields. For a read-one tool of this complexity, an agent has everything needed to call it and interpret the outcome.

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 more by stating the cross-parameter constraint that document_type must match document_id and by naming the resulting error. That is genuine meaning the schema does not encode as a constraint.

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?

"Read one sales document in full" gives a specific verb plus resource and scope (single document, full payload), then enumerates the resource family (invoice, quotation). It explicitly separates itself from get_voucher and download_document, so an agent can route without opening a 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?

It names two alternatives with the conditions that select them: "For a bookkeeping voucher use get_voucher" and the note that download_document refuses drafts. The draft case doubles as a when-not-to-use rule, leaving nothing to inference.

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