Skip to main content
Glama

Ändra leverantörsfaktura

update_supplier_invoice
Idempotent

Ändra en ännu ej bokförd leverantörsfaktura (bara medskickade fält ändras). Med lines ([{account, net_ore, vat_rate, description?}]) ersätts raderna och total/moms räknas om; document_id kopplar/ändrar fakturans underlag (PDF) i efterhand. Scope reconcile. Argument: orgnr, invoice_id; valfritt supplier_name, invoice_number, ocr, invoice_date, due_date, total_ore, vat_ore, currency, expense_account, document_id, lines, rounding_ore, fx_rate, total_sek_ore (annan valuta: belopp i fakturans valuta, kurs eller SEK-belopp från ANVÄNDAREN).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ocrNo
linesNo
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
fx_rateNo
vat_oreNo
currencyNo
due_dateNo
total_oreNo
invoice_idYes
document_idNo
invoice_dateNo
rounding_oreNo
supplier_nameNo
total_sek_oreNo
invoice_numberNo
expense_accountNo

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.3/5.0
Behavior4/5

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

Annotations cover safety (readOnly=false, idempotent=true, destructive=false) but the description adds real value beyond them: partial-update semantics ('bara medskickade fält ändras'), that lines replacement triggers total/VAT recalculation, that document_id re-links the PDF afterwards, and the required OAuth scope 'reconcile'. It omits permission/auth prerequisites beyond the scope string.

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-loads the mutation semantics and the important lines/document_id behavior before the argument enumeration. Dense but each sentence carries information; the trailing argument list is somewhat redundant with the schema, though justified by the near-zero schema coverage.

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 16-parameter mutation tool with no output schema, the description covers scope, partial-update behavior, recalculation effects, and the meaning of the tricky currency/line fields. Missing only date formats and any statement of return value, which is a modest gap.

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 6%, so the description carries the burden, and it mostly does: it names all 16 arguments, documents the lines item shape ({account, net_ore, vat_rate, description?}), explains document_id's role, and clarifies fx_rate/total_sek_ore semantics for foreign currency. Format details for dates and several other fields remain undocumented, keeping it below a 5.

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+resource ('Ändra en ännu ej bokförd leverantörsfaktura') and scopes it to unbooked invoices, which distinguishes it from book_supplier_invoice and create_supplier_invoice. An agent can identify the target object and the pre-condition 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 'ännu ej bokförd' constraint plus 'bara medskickade fält ändras' clearly signals when this tool applies (draft invoices only, partial update). It does not name a specific alternative tool or state what to do for already-booked invoices, so it stops short of a full when/when-not routing.

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