Skip to main content
Glama

Ersätt alla avstämningsrader

set_bilaga_spec
DestructiveIdempotent

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.

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>",
      "bilaga_type": "<bilaga_type>",
      "account": "<account>",
      "year": "<year>",
      "month": "<month>",
      "rows": "<rows>"
    },
    "name": "set_bilaga_spec"
  }
}

Input 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.7/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses the side effect (previous rows are overwritten, the attest is not changed), the permission requirement (behörigheten reconcile) and the return content (bilaga with rows, reconciled amount and difference). Annotations already flag destructive/idempotent, so this is genuine added context; only the overwrite risk severity could be stated more prominently.

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

Conciseness5/5

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

A single dense paragraph that is front-loaded with purpose, followed by usage/alternative, then business semantics, then side effects and permissions. No sentence is filler and every clause carries operational information.

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 destructive 6-parameter mutation with no output schema, the definition covers what is replaced, what is untouched, what is returned, the permission gate and how to compute correct values. Nothing an agent needs to invoke it safely is missing.

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 coverage is 100% so the baseline would be 3, but the description adds business meaning the schema does not: the sum of rows becomes the reconciled amount and must match gl_balance_ore from get_reconciliation to zero the difference, plus [] empties the rows. Per-parameter detail (orgnr, year, month formats) is left to the schema, which already covers it.

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?

Specific verb (Ersätter) plus exact resource (alla manuella specifikationsrader på en avstämning/bilaga) and it explicitly names the sibling add_bilaga_row as the contrasting operation. An agent can distinguish it from add_bilaga_row 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?

States explicitly when to use it (whole specification set or reset, [] to empty), when not to (adding a single row while keeping the rest) and names the alternative add_bilaga_row. Also gives the prerequisite context for a correct call via get_reconciliation/gl_balance_ore.

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.