Skip to main content
Glama

Bokför momsavräkning

approve_and_book_vat

Godkänn och bokför momsavräkningen för en period (nolla momskontona mot redovisningskontot). KODEN postar. Kräver scope book; ett satt bokföringstak (0 = ingen gräns) får inte överstigas. Före periodens slut avvisas bokföringen; fråga användaren och sätt before_period_end=true bara om hen godtar att perioden bokförs i förväg (det som bokförs i perioden senare blir då en differens). Visar get_vat_return drift_ore skilt från 0 har moms bokförts i perioden efter omföringen: difference=true bokför bara differensen. Argument: orgnr, key (periodnyckel); valfritt year, before_period_end (eller confirm), difference.

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>",
      "key": "<key>"
    },
    "name": "approve_and_book_vat"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
yearNo
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
confirmNo
differenceNo
before_period_endNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "title": "Confirm",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / before_period_end
      Added value: +{
      +  "default": false,
      +  "title": "Before Period End",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / difference
      Added value: +{
      +  "default": false,
      +  "title": "Difference",
      +  "type": "boolean"
      +}
  3. 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."
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare the write, non-idempotent profile, but the description adds substantial context they do not: the accounting effect of zeroing VAT accounts, the authorization scope requirement, the booking-cap ceiling, the fact that the call is refused before period end, and how later postings become a difference. It stops short of stating reversibility (reverse_voucher exists as a sibling) or timing.

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 action and its accounting effect, then conditions, then a compact argument list. Sentences are dense with nested parentheses and run long, but no sentence is pure padding.

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 non-idempotent mutation with no output schema and thin parameter documentation, the description covers scope, ceiling, refusal condition, override, and differential posting. Remaining gap is where the period key comes from and whether the posting can be reversed, which an agent needs to recover from mistakes.

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 description coverage is only 17%, so the description must compensate, and it does: it identifies key as the period key, explains before_period_end semantics (and its confirm alias), and explains difference=true as booking only the difference. Year is left uncharacterized, and the period-key format and source (list_vat_periods) is only hinted at as 'periodnyckel'.

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 precise verb pair (approve and book) and resource (momsavräkningen) plus the exact accounting effect: zeroing the VAT accounts against the reporting account. An agent can distinguish it from sibling get_vat_return or list_vat_periods without opening the 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?

Explicitly names preconditions (scope book, booking cap must not be exceeded), the rejection condition before period end, the requirement to ask the user before setting before_period_end, and the decision rule to use difference=true when drift_ore is non-zero from get_vat_return. It even routes to the sibling tool that supplies the deciding signal.

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.