Skip to main content
Glama

Ersätt alla avstämningsrader

set_bilaga_spec
Idempotent

Ersätter alla manuella specifikationsrader på en avstämning (bilaga), som radeditorn i appen. Använd när hela specifikationen ska sättas eller nollställas (skicka [] för att tömma); för att lägga till en enstaka rad och behålla resten, använd add_bilaga_row. Summan av raderna blir det avstämda beloppet; för att nolla differensen ska den matcha kontots slutsaldo (gl_balance_ore i get_reconciliation). Returnerar bilagan med rader, avstämt belopp och differens. Bieffekt: tidigare rader skrivs över; attesten ändras inte. Kräver behörigheten reconcile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesAlla rader som ska gälla: [{description, amount_ore}], belopp i öre. Skicka [] för att tömma.
yearYesKalenderår för avstämningsmånaden, t.ex. 2026.
monthYesAvstämningsmånad 1 till 12, t.ex. 3 för mars.
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
accountYesKontonummer i BAS-kontoplanen, t.ex. 1930.
bilaga_typeYesAvstämningens typ som den visas i get_open_reconciliations, t.ex. BANK eller GL_ACCOUNT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / account / description
      Added value: +"Kontonummer i BAS-kontoplanen, t.ex. 1930."
    • addedInput schema / properties / bilaga_type / description
      Added value: +"Avstämningens typ som den visas i get_open_reconciliations, t.ex. BANK eller GL_ACCOUNT."
    • addedInput schema / properties / month / description
      Added value: +"Avstämningsmånad 1 till 12, t.ex. 3 för mars."
    • addedInput schema / properties / orgnr / description
      Added value: +"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies."
    • addedInput schema / properties / rows / description
      Added value: +"Alla rader som ska gälla: [{description, amount_ore}], belopp i öre. Skicka [] för att tömma."
    • addedInput schema / properties / year / description
      Added value: +"Kalenderår för avstämningsmånaden, t.ex. 2026."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the overwrite side effect ('tidigare rader skrivs över'), that the attestation is untouched, the required permission ('Kräver behörigheten reconcile'), and the returned content. Since annotations already declare write/idempotent/non-destructive, this added behavioral context is a genuine gain; a possible tension with destructiveHint=false exists but the full-state 'set' semantics and idempotent re-run make it defensible rather than contradictory.

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 purpose, then usage, then behavioral consequences and return values, in a compact single block. Dense but every sentence carries information; slightly more prose than strictly required but no 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?

Although there is no output schema, the description states what is returned (rows, reconciled amount, difference), the destructive side effect, the permission requirement, and the relationship to get_reconciliation. Nothing essential for a correct call is missing.

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% and every parameter (orgnr, bilaga_type, account, year, month, rows) is already documented in the schema. The description adds conceptual meaning for rows (their sum becomes the reconciled amount, [] empties it), but no per-parameter syntax beyond what the schema supplies, so the baseline 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 ('Ersätter alla manuella specifikationsrader på en avstämning'), and immediately distinguishes itself from the sibling add_bilaga_row by naming the full-set-replace semantics. An agent can tell it apart from the incremental-row tool without opening either 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?

Explicit when-to-use ('när hela specifikationen ska sättas eller nollställas (skicka [] för att tömma)'), explicit when-not ('för att lägga till en enstaka rad och behålla resten'), and it names the alternative (add_bilaga_row). It further routes the agent to get_reconciliation for the gl_balance_ore needed to zero the difference.

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