Skip to main content
Glama

Ändra kundfaktura

update_customer_invoice
Idempotent

Ändra en EJ bokförd kundfaktura (utkast). Bara medskickade fält ändras. Med lines ersätts raderna och total/moms räknas om. Scope reconcile. Argument: orgnr, invoice_id; valfritt customer_name, invoice_number, ocr, invoice_date, due_date, total_ore, vat_ore, currency, income_account, rounding_ore, lines, customer_orgnr, customer_address, customer_email, customer_reference, payment_terms, service_description, seller_address, seller_bank, seller_iban, seller_bic, seller_bankgiro, seller_contact, husarbete (ROT/RUT, samma form som i create_customer_invoice; {type: ""} tar bort husarbetet). Ändras raderna utan att husarbete skickas med behålls beloppen om de ryms, annars sänks avdraget till högsta möjliga.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ocrNo
linesNo
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
vat_oreNo
currencyNo
due_dateNo
husarbeteNo
total_oreNo
invoice_idYes
seller_bicNo
seller_bankNo
seller_ibanNo
invoice_dateNo
rounding_oreNo
customer_nameNo
payment_termsNo
customer_emailNo
customer_orgnrNo
income_accountNo
invoice_numberNo
seller_addressNo
seller_contactNo
seller_bankgiroNo
customer_addressNo
customer_referenceNo
service_descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / orgnr / description
      Added value: +"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the mutation/idempotency profile; the description adds substantial semantics beyond them: partial-update behavior ('Bara medskickade fält ändras'), lines replacing rows with total/VAT recalculation, husarbete sharing the create_customer_invoice shape, '{type: ""}' clearing the ROT/RUT deduction, and the fallback that retained amounts are lowered to the maximum allowed. This is exactly the non-obvious behavioral context annotations cannot convey.

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 decisive constraint (only draft invoices) and the update semantics before the argument enumeration. It is dense and the 26-name argument list is close to a data dump, but given the near-empty schema it largely earns its length.

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

Completeness4/5

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

For a 26-parameter mutation with no output schema and 4% schema coverage, the description covers the essential preconditions and the non-obvious update rules (lines replacement, husarbete handling). It leaves out format expectations for most optional fields and any note on what is returned/confirmed after the update.

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 description coverage is only 4% (only orgnr documented), so the description must carry the burden, and it does list every argument name plus real semantics for the tricky ones (lines, husarbete, orgnr/invoice_id requiredness). It does not give formats for the many seller_*/customer_* string fields, so it falls short of full compensation.

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 (Ändra = change/update) and resource (kundfaktura = customer invoice), and adds the crucial scope qualifier 'EJ bokförd (utkast)' that separates it from book_customer_invoice, cancel_customer_invoice and create_customer_invoice. An agent can identify exactly what this mutates without opening the schema.

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

Usage Guidelines4/5

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

The precondition 'EJ bokförd kundfaktura (utkast)' tells the agent when this tool is applicable and implicitly excludes booked invoices, and it names the required auth scope (reconcile). It does not explicitly name alternative tools (e.g. cancel_/credit_customer_invoice for other states), so it stops short of a 5.

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