Skip to main content
Glama

Update document

update_document
Idempotent

Update a document by id. Only the fields you pass are changed.

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": {
      "id": "<id>"
    },
    "name": "update_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesdocument id
sourceNosource
push_asNoWhich sevDesk object this document becomes, i.e. WHO ASSIGNS THE INVOICE NUMBER. "voucher" = we bring our own number (a shop or portal invoice with its own gapless numbering); sevDesk draws none. "invoice" = sevDesk writes the invoice and takes a number from its own debtor range. Leave it unset and it is derived: an outgoing document on a revenue account WITH its own metadata.booking.invoice_number becomes a voucher, without one an invoice; an incoming document is always a voucher. If the derivation is not unambiguous the push refuses rather than guessing.
currencyNocurrency
due_dateNodue_date
metadataNometadata
vat_codeNovat_code
directionNodirection
file_nameNofile_name
file_pathNofile_path
contact_idNocontact_id
issue_dateNoissue_date
line_itemsNoline_items
vat_amountNovat_amount
cost_centreNocost_centre
vendor_nameNovendor_name
legal_entityNolegal_entity
total_amountNototal_amount
withheld_feeNoA fee the payment provider KEPT BACK before paying out, as a POSITIVE amount in the document's currency — the way it reads on the settlement ("fee 0.89"). The push adds it as a second, negative position, so the voucher total equals what actually reached the bank and the payment settles to status 1000 instead of leaving the fee open at 750. Without it a gross invoice paid net leaves a phantom receivable against the customer and no record of the fee. Applies to PayPal, Stripe, Amazon, Tipalti — they all settle net.
document_typeNodocument_type
document_sourceNodocument_source
kontenrahmen_idNokontenrahmen_id
confidence_scoreNoconfidence_score
skr_account_nameNoskr_account_name
invoice_directionNoWhich way the invoice points, and with it the booking side in sevDesk: outgoing (a sale) becomes creditDebit D = Einnahme, incoming (a purchase) becomes C = Ausgabe. Leave it unset and the side is derived from the booking account — a revenue account books as D. Set it explicitly whenever the account alone would not say, because the wrong side moves the amount to the wrong side of the P&L. NOTE: this decides the SIDE, not the endpoint — which sevDesk object a document becomes is push_as.
processing_statusNoprocessing_status
cost_centre_sourceNocost_centre_source
skr_account_numberNoskr_account_number
legal_entity_sourceNolegal_entity_source
external_category_idNoexternal_category_id
withheld_fee_accountNoSKR account for the withheld fee, default 4700 (Erlösschmälerungen). It has to be a REVENUE-side account: a voucher carries one taxRule and sevDesk validates it against every position's account, so a revenue account and an expense account cannot share a voucher (4338 needs rule 17, 6855 rule 9, 4970 rule 22 — measured). The fee is therefore booked as a revenue reduction, not as an expense.
account_source_detailNoaccount_source_detail
external_category_nameNoexternal_category_name
external_category_sourceNoexternal_category_source

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the safety profile is covered structurally. The description usefully adds PATCH-style semantics (unspecified fields are preserved), which is behavior beyond the annotations. It says nothing about validation failures, side effects of pushing documents into sevDesk, or what an update returns.

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?

Two short sentences, front-loaded with the action and the mutation semantics, with no redundant restatement of the title or annotations. Nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 34-parameter mutation with nested objects and no output schema, the prose is thin: it does not warn that options like push_as or withheld_fee cause downstream object creation in sevDesk, nor does it describe error behavior (the schema notes the push refuses on ambiguous derivation). The schema compensates for parameter detail, but the overall behavioral picture is only minimally complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the field-level descriptions are unusually rich, especially for push_as, invoice_direction, withheld_fee and withheld_fee_account, so the schema does the heavy lifting. The description contributes no parameter meaning of its own beyond the general partial-update rule; the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Update a document by id"), so the agent immediately knows the operation and the addressing key. It does not distinguish this from near-name siblings such as update_document_source or update_incoming_document, leaving the agent to infer the boundary from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The clause "Only the fields you pass are changed" implies a partial-update usage pattern, but there is no explicit when-to-use guidance, no statement of prerequisites, and no pointer to alternative tools for the adjacent update operations. The agent must guess the selection criteria.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources