Skip to main content
Glama

Bokför kundfaktura

book_customer_invoice

Bokför en kundfaktura som redan har skapats med create_customer_invoice, så att fordran, intäkt och utgående moms hamnar i huvudboken (D 1510 / K intäkt / K moms på 2610, 2620 eller 2630 beroende på momssats). Använd för fakturor i kundreskontran i stället för book_voucher eller create_voucher, så att fakturan får rätt status och kan betalas av med register_customer_payment. En ROT/RUT-faktura delas: kundens del på 1510 och den preliminära skattereduktionen på 1513 (fordran på Skatteverket); den kräver kompletta uppgifter (se husarbete.missing). Returnerar fakturan med verifikatnummer och status. Bieffekt: verifikatet postas direkt och ett satt bokföringstak får inte överstigas. Kräver behörigheten book.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
invoice_idYesKundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / invoice_id / description
      Added value: +"Kundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices."
  2. 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."
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, idempotent=false, destructive=false), it discloses real behavioral traits: the voucher posts immediately, a booking cap must not be exceeded, the book permission is required, ROT/RUT invoices split across 1510/1513, and it returns the invoice with voucher number and status. This is the kind of context annotations cannot carry.

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 core action and accounting effect, and every sentence carries operational content (alternatives, ROT/RUT, side effects, permission). It is dense and fairly long, but nothing is filler.

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

Completeness5/5

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

For a posting/mutation tool with no output schema, the description covers return value ('returnerar fakturan med verifikatnummer och status'), side effects, prerequisites, and auth. An agent has everything needed to invoke it correctly.

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%, so both params (orgnr, invoice_id) are already documented with format and retrieval hints. The description adds no syntax or meaning beyond the schema for the parameters themselves, so the baseline of 3 applies.

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 and resource ('Bokför en kundfaktura') and pins the precondition that it was created by create_customer_invoice. It elaborates the exact accounting outcome (D 1510 / K intäkt / K moms 2610-2630), which makes it unmistakable from neighbors like book_voucher or create_voucher.

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 to use this for customer-ledger invoices 'istället för book_voucher eller create_voucher', naming the alternatives and the reason (correct status, payable via register_customer_payment). It also flags the ROT/RUT special case and its completeness prerequisite (husarbete.missing).

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