Skip to main content
Glama

Bokför årsavslutssteg

book_year_end_step

Bokför ett årsavslutssteg. Har steget ett förslag (action='book') postar KODEN checklistans balanserade verifikat — LLM väljer bara steget. För ett manuellt steg (action='manual', t.ex. periodiseringar utan förslag) anger du en egen balanserad journal. Låser aldrig perioden (det gör en människa). När aktuell_skatt bokförs låses skatteberäkningen för året (den sparade skatten är den som bokförs); den låses upp under Skatt och deklaration. Året måste finnas bland bolagets räkenskapsår (list_fiscal_years). Kräver scope book. Argument: orgnr, year (slutåret), step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat); valfritt journal ([{account, debit_ore, credit_ore, text?}]) för manuella steg. Före räkenskapsårets slut avvisas bokföringen; fråga användaren och sätt before_year_end=true (eller confirm=true) bara om hen godtar att steget bokförs i förväg. Steget kontantfakturor: har förslaget fx (fakturor i annan valuta) anges balansdagens kurs per valuta i fx_rates ({valuta: kurs}) som användaren har angett; gissa aldrig kursen.

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>",
      "year": "<year>",
      "step": "<step>"
    },
    "name": "book_year_end_step"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepYes
yearYes
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
confirmNo
journalNo
fx_ratesNo
before_year_endNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / fx_rates
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Fx Rates"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / before_year_end
      Added value: +{
      +  "default": false,
      +  "title": "Before Year End",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "title": "Confirm",
      +  "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

A3.8/5.0
Behavior3/5

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

The annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false) already flag this as a non-read-only, non-destructive mutation, and the description adds substantial behavior: it never locks the period (a human does), booking aktuell_skatt locks the year's tax calculation until released under Skatt och deklaration, and scope 'book' is required. These are real additions beyond annotations, but the description says nothing about what is returned or whether re-posting the same step duplicates vouchers.

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?

Core purpose and mode distinction are front-loaded, and nearly every sentence carries an operational constraint. It is a dense single block of Swedish prose though, with period-locking, tax-locking, preconditions, parameters and fx rules all compressed together, which makes scanning harder than it needs to be.

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 with no output schema and low schema coverage, the description covers the essentials: mode selection, locking semantics, fiscal-year precondition, confirmation flow and fx sourcing. It leaves the response shape and the mechanism that actually selects book versus manual mode (the non-existent `action`) unexplained, which is a real but narrow gap.

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?

With only 14% schema coverage, the description carries most of the burden and mostly succeeds: it defines year as the closing year, enumerates step values (periodiseringar|dispositioner|aktuell_skatt|arets_resultat), and gives the journal shape ([{account, debit_ore, credit_ore, text?}]) plus fx_rates as {valuta: kurs}. Gaps: the step list omits 'kontantfakturor' which is later described as a step, and the phantom `action` argument is not a schema field, leaving an agent unsure how mode is actually signaled.

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?

The description states a specific verb and resource ('Bokför ett årsavslutssteg') and immediately clarifies the two operating modes: proposal-driven posting where 'LLM väljer bara steget' versus manual posting where the caller supplies a balanced journal. This lets an agent tell it apart from siblings like skip_year_end_step or undo_year_end_step. Minor muddiness from referring to an `action` parameter ('action=book'/'action=manual') that does not exist in 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Strong conditional guidance: use manual mode for accruals lacking a proposal, the year must exist per list_fiscal_years, posting before fiscal year end is rejected unless the user agrees and before_year_end/confirm is set, and fx rates must come from the user and never be guessed. It stops short of explicitly naming sibling tools as alternatives for skipping or undoing a step.

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.