Skip to main content
Glama

Registrera leverantörsfaktura

create_supplier_invoice

Registrera en leverantörsfaktura (bokförs inte förrän du bokför den med book_supplier_invoice). Scope reconcile. Ange antingen kontorader (lines = [{account, net_ore, vat_rate, description}], moms per rad räknas ut och total härleds ur raderna + rounding_ore) ELLER enradsläget (total_ore + vat_ore + expense_account). document_id kopplar ett underlag (fakturans PDF från inkorg/dokument, se list_available_underlag). ANNAN VALUTA än SEK (currency, t.ex. EUR/USD): ange beloppen som på fakturan (hundradelar i fakturans valuta) och fx_rate (SEK per 1 enhet) ELLER total_sek_ore (totalbelopp i SEK) som ANVÄNDAREN har angett. Gissa aldrig kursen: fråga användaren. Klienter med stöd för elicitation får frågan direkt; annars returneras ett fel med frågan. Kvickd räknar om till SEK och sparar originalbelopp och kurs. Argument: orgnr, supplier_name, invoice_number, invoice_date; valfritt lines, rounding_ore, total_ore, vat_ore, due_date, ocr, currency, fx_rate, total_sek_ore, expense_account, supplier_id, document_id.

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
currencyNoSEK
due_dateNo
total_oreNo
document_idNo
supplier_idNo
invoice_dateYes
rounding_oreNo
supplier_nameYes
total_sek_oreNo
invoice_numberYes
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.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that nothing is booked yet, that non-SEK amounts are converted to SEK while the original amount and rate are stored, that the agent must never guess an FX rate, and that elicitation-capable clients get the rate question inline while others receive an error carrying the question. That is rich side-effect and failure-mode disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the not-booked caveat are correctly front-loaded, but the block is dense and ends with a bare re-listing of every argument that duplicates the schema. Capitalized emphasis and the packed currency paragraph cost readability.

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 and near-zero schema documentation, the description covers modes, currency conversion, booking lifecycle, document linkage, and elicitation fallback. It does not address duplicate handling or error conditions for malformed lines, which leaves a small 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 must compensate, and it largely does: it defines the lines element shape {account, net_ore, vat_rate, description}, explains that VAT is computed per line and the total derived from lines + rounding_ore, and gives the semantics of currency/fx_rate/total_sek_ore. The leftover gaps are the unexplained fields (ocr, due_date, supplier_id), which appear only in the trailing argument list.

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 (registrera en leverantörsfaktura) and immediately scopes it against the sibling book_supplier_invoice by noting it is not booked until then. An agent can distinguish this from create_voucher, book_supplier_invoice, and update_supplier_invoice 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 Guidelines5/5

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

Explicitly says when the invoice becomes a ledger event (only via book_supplier_invoice), offers two mutually exclusive input modes (line mode vs single-line total_ore+vat_ore+expense_account), and routes to list_available_underlag for document_id. Non-SEK handling is spelled out with a when-to-use branch.

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