Skip to main content
Glama

Bokför verifikat med källhänvisning

book_voucher

Bokför ett verifikat i huvudboken med debet- och kreditrader och en obligatorisk källhänvisning (basis). Använd när verifikatet bygger på något du har läst i Kvickd, t.ex. en bankrad, en avvikelse eller ett godkänt förslag, och ska kunna spåras dit. Vill du bokföra med tecknade belopp och bifoga kvitton direkt, använd create_voucher; ska en människa granska först, använd propose_voucher. Returnerar verifikatets id, serie och nummer. Bieffekt: verifikatet postas direkt. Koden validerar att debet är lika med kredit, att det finns minst två rader och att perioden inte är låst, och ett satt bokföringstak får inte överstigas. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Kräver behörigheten book.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes
textYes
basisYes
linesYes
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
seriesNoA
fx_rateNo
currencyNo
finding_refNo
proposal_idNo
total_sek_oreNo
foreign_amount_minorNo

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?

Goes well beyond the annotations: discloses the immediate posting side effect ('verifikatet postas direkt'), the validation rules enforced server-side (debit=kredit, minimum two rows, period not locked, booking ceiling), the required 'book' permission, and currency-handling behavior. This is strong behavioral disclosure for a non-idempotent mutation. Slightly short of 5 only because it does not describe whether/book the operation can be reversed or what happens on partial failure.

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 purpose, then alternatives, return values, side effects, validation, currency guidance and permission in a logical order. Dense but each block earns its place; the currency paragraph is long but necessary given the ambiguity of the parameters.

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 12-param mutation with no output schema, it supplies the return shape (id, serie, nummer), the safety/authorization profile and validation constraints. Remaining gaps are the undocumented scalar params (orgnr, series, text), but the high-risk currency path and the required basis are fully covered.

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 coverage is only 8% across 12 params, so the description must carry the burden. It explains the most ambiguous parameters well (basis as mandatory source reference, currency, foreign_amount_minor, fx_rate, total_sek_ore with the 'never guess the rate' rule), but leaves orgnr, series, text, lines, finding_ref and proposal_id entirely undocumented. Partial compensation for a large coverage gap.

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 ett verifikat i huvudboken') plus the defining constraint (debet-/kreditrader and a mandatory källhänvisning/basis). It explicitly distinguishes itself from sibling tools create_voucher and propose_voucher by name, so an agent can route correctly without opening a 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?

Gives an explicit trigger ('Använd när verifikatet bygger på något du har läst i Kvickd... och ska kunna spåras dit') and names two alternatives with the conditions that select them: create_voucher for signed amounts with attachments, propose_voucher when a human must review first. When/when-not/alternatives are all present.

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