Skip to main content
Glama
Unofficial Lexware Office MCP Server

Unofficial Lexware Office MCP Server

get_sales_document

Read-only

Retrieve a full sales document such as an invoice or quotation, including recipient, line items, prices, totals, tax breakdown, and version. Use it to inspect a document by type and ID.

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. Addedv0.8.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, so the description carries the rest of the burden and does it: single API call, the exact fields returned (recipient, line items with unit prices, totals, tax breakdown, version), and how drafts behave with voucherStatus 'draft'.

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?

Front-loaded with what it does and what comes back, then short paragraphs for the type constraint, the draft caveat and the sibling hand-off. Every sentence carries information an agent needs; nothing is padding.

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 two-parameter read tool with no output schema and minimal annotations, the description covers purpose, return contents, failure semantics and the draft edge case, leaving nothing an agent would need before calling it.

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 both parameters are already documented and the baseline would be 3. The description adds real meaning beyond the schema by stating the id/type consistency constraint and its 'not found' failure mode, which the schema text does not spell out.

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?

Names a specific verb and resource ('Read one sales document in full') and immediately scopes it to invoices, quotations and their kin. It also explicitly distinguishes itself from the sibling get_voucher, so an agent can route 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 an explicit alternative and the condition that selects it: 'For a bookkeeping voucher use get_voucher.' It also warns that document_type must match the id or the call behaves like a wrong-id miss, which is a real usage precondition rather than generic advice.

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