Skip to main content
Glama

ZUGFeRD-Bereit

Update extracted invoice draft fields

update_invoice_draft
Destructive

Patches fields on an existing invoice draft (or creates a structured JSON draft for a Single Order / API-key job) to fill missing required fields (e.g. service_date, payment.payment_terms, seller/buyer details) and returns updated preflight field_issues.

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": {
      "invoice": "<invoice>"
    },
    "name": "update_invoice_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceYesInvoiceRequest fields (full object for a new job, or deep-merge patch for an existing job).
job_tokenNoExisting job_token to patch; omit to start a new job directly from structured JSON.
accept_avvNoRequired ("1.3") when starting a new anonymous Single Order without job_token.
buyer_is_businessNoRequired (true) when starting a new anonymous Single Order without job_token.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and non-read-only, so the mutation profile is covered structurally. The description adds real context beyond that: merge/patch semantics on an existing draft, the alternate create path when job_token is omitted, required-field targeting, and the returned 'updated preflight field_issues'. It does not explain what a patch can overwrite or how the destructive flag manifests.

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?

A single sentence, front-loaded with the verb and resource, with the alternate mode in a parenthetical and the concrete field examples placed where they help. Slightly dense with layered clauses, but no filler or repetition.

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 destructive, non-idempotent mutation with a nested object parameter and no output schema, the description covers purpose, modes, and the 'field_issues' return hint. It stops short of explaining consequences of overwriting fields, error behavior, or ordering relative to extract/validate, which is the main gap given the destructive annotation.

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 coverage is 100% and every parameter is already documented in the schema, so baseline is 3. The description contributes marginally by giving nested field paths ('payment.payment_terms') that illustrate deep-merge addressing, but does not add syntax, format, or collision behavior for the invoice object beyond what the schema says.

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?

Names a specific verb and object ('Patches fields on an existing invoice draft') and calls out the secondary mode ('creates a structured JSON draft for a Single Order / API-key job'), plus concrete field examples. An agent can tell it mutates an already-extracted draft, but the description never names the extract step or a sibling, so differentiation is left implicit.

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

Usage Guidelines3/5

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

Usage context is implied ('to fill missing required fields', with 'service_date, payment.payment_terms, seller/buyer details' as examples) and the job_token-vs-new-job fork is sketched. There is no explicit when-not guidance and no statement that extraction must happen first, so the agent must infer the workflow position.

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