Skip to main content
Glama
Unofficial Lexware Office MCP Server

Unofficial Lexware Office MCP Server

attach_file_to_voucher

Attach a file to an existing voucher by voucher ID instead of creating a new voucher that cannot be deleted through the API.

Instructions

Attach a file to a voucher that already exists.

Use this rather than upload_file when the voucher is there: that one creates a new voucher for every file, and a voucher cannot be deleted through the API, so the wrong choice leaves one behind for good.

Writes to the account, and the API cannot take it back: there is no call that detaches a file. Confirm the organization with get_profile first. One API call, never retried.

Takes PDF, JPEG, PNG or XML, at most 5 MiB, from a path or a URL. The answer is the new file id, which download_file reads back.

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>",
      "source": "<source>"
    },
    "name": "attach_file_to_voucher"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesThe file: a full path on this machine, or a URL to fetch it from. A URL works only for addresses the account owner allowed.
voucher_idYesThe voucher to hang the file on, by id from search_vouchers. It has to exist already.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • changedInput schema / properties / source / description
      Previous value: -"The file: a path on this machine, or a URL to fetch it from. A URL works only for addresses the account owner allowed."New value: +"The file: a full path on this machine, or a URL to fetch it from. A URL works only for addresses the account owner allowed."
  2. Changed3 schema fields changedv0.11.0
    • removedInput schema / properties / source / title
      Removed value: -"Source"
    • removedInput schema / properties / voucher_id / title
      Removed value: -"Voucher Id"
    • removedInput schema / title
      Removed value: -"attach_file_to_voucherArguments"
  3. 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 by disclosing irreversibility ("the API cannot take it back: there is no call that detaches a file"), the execution profile (one API call, never retried), and input constraints (PDF/JPEG/PNG/XML, max 5 MiB). The annotations say destructiveHint=false, which is consistent since the call creates rather than deletes data; the irreversibility note is additional context, not a contradiction.

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?

Four short paragraphs, each doing one job: purpose, sibling routing, risk/prerequisite, and input/output contract. The most decision-critical constraint (wrong choice leaves an undeletable voucher) is front-loaded; no filler sentences.

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?

Despite having no output schema, the description states what comes back ("the new file id, which `download_file` reads back"). Combined with file-type/size limits, the prerequisite check, and the irreversibility warning, an agent has everything needed to invoke this safely.

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% and already documents both parameters, but the description adds constraints not present in the schema: the accepted file types, the 5 MiB ceiling, and the caveat that a URL works only for addresses the account owner allowed. It does not explain the voucher_id format beyond what the schema says, which is fine.

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?

States a specific verb and resource plus its precondition: "Attach a file to a voucher that already exists." It also names the sibling it is not (`upload_file`) and explains that sibling's differing behavior, so the agent can pick correctly without opening either 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?

Explicit when-to-use (the voucher already exists) and when-not (use `upload_file` when creating a new voucher), plus the concrete consequence of choosing wrong (an orphan voucher that cannot be deleted via API). It also gives a prerequisite step, confirming the organization with `get_profile` first.

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