Skip to main content
Glama

Bokför leverantörsbetalning

register_supplier_payment

Bokför en leverantörsbetalning på en faktura. KODEN postar. Kräver scope book; ett satt bokföringstak (0 = ingen gräns) får inte överstigas. Argument: orgnr, invoice_id, pay_date (YYYY-MM-DD), amount_ore; valfritt bank_account (likvidkonto 1900-1999 som krediteras, default 1930), settle (faktura i annan valuta: amount_ore = SEK som faktiskt betalades och settle=true slutreglerar fakturan; skillnaden mot den bokförda skulden bokförs som kursförlust 7960 eller kursvinst 3960). Med kontantmetoden (method=kontant på fakturan) bokförs i stället kostnad och ingående moms mot likvidkontot, i proportion till betalningen. En faktura i annan valuta: amount_ore är kronorna som drogs från kontot och foreign_amount_minor den del av fakturan som betalas, i fakturans valuta (utelämnat = resten); kostnaden bokförs med kronbeloppet och momsen med fakturans momsbelopp.

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": {
      "orgnr": "<orgnr>",
      "invoice_id": "<invoice_id>",
      "pay_date": "<pay_date>",
      "amount_ore": "<amount_ore>"
    },
    "name": "register_supplier_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
settleNo
pay_dateYes
amount_oreYes
invoice_idYes
bank_accountNo
foreign_amount_minorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / foreign_amount_minor
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Foreign Amount Minor"
      +}
  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.2/5.0
Behavior4/5

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

Far beyond the annotations: it discloses the posting mechanics (bank_account 1900-1999 credited, default 1930), FX handling (difference vs booked liability goes to 7960 loss or 3960 gain), and how cash-method invoices are booked pro rata. The only thing withheld is what happens on rejection or whether re-submission duplicates a payment, notable given idempotentHint=false.

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?

Purpose and the scope/ceiling constraint are front-loaded, and most sentences carry operational content. The FX explanation is split across the settle clause and the closing paragraph with some overlap (both restate that amount_ore is the SEK debited), so it is slightly longer than strictly necessary.

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 7-parameter mutation tool with no output schema and only flag-level annotations, the description covers prerequisites, side effects, account defaults, cash-method behavior, and FX edge cases. Failure modes and response shape are absent, but return values are out of scope without an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 14%, but the description compensates for nearly every parameter: orgnr, invoice_id, pay_date format (YYYY-MM-DD), amount_ore as the SEK actually debited, bank_account range and default, settle's clearing semantics, and foreign_amount_minor as the portion paid in the invoice currency (omitted = remainder). That is meaningful meaning added well beyond the bare schema titles.

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?

"Bokför en leverantörsbetalning på en faktura" gives a specific verb (book/post) and resource (supplier payment on an invoice), which cleanly separates it from customer-side siblings like register_customer_payment. It does not explicitly disambiguate against reverse_supplier_payment, but the action is unambiguous.

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 description states prerequisites (scope book, bookkeeping ceiling that must not be exceeded) and spells out the conditional usage paths: settle for FX invoices, and the kontantmetod case where cost and input VAT are booked against the liquidity account. It stops short of naming when to prefer a sibling such as reverse_supplier_payment, which is the only missing routing guidance.

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.