Skip to main content
Glama

Förhandsberäkna lön

calc_payroll
Read-onlyIdempotent

Förhandsberäkna en lönekörning (skatt + arbetsgivaravgift) UTAN att bokföra. Scope payroll. Argument: orgnr, year, month, pay_date (YYYY-MM-DD), entries ([{employee_id, gross_cash_ore, benefit_ore?, extra_tax_ore?, components?}]); extra_tax_ore justerar skatteavdraget (+extra skatt / −jämkning). components = lönearter [{kind, description?, amount_ore}], kind ∈ LON|SEMESTER|OVERTID|SJUKLON|OB|SJUKAVDRAG|BRUTTOAVDRAG|FORMAN|UTLAGG|NETTOAVDRAG (positiva belopp; arten styr tecknet). Valfritt note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
yearYes
monthYes
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
entriesYes
pay_dateYes

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

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety bar is low; the description adds real value by specifying the calculation content (skatt + arbetsgivaravgift) and the non-posting behavior that matches readOnlyHint. It does not describe output format or the effect on subsequent run_payroll, keeping it below 5.

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 before the dense argument list, and every clause (types, formats, enum values, sign conventions) earns its place given the sparse schema. The parameter enumeration is run-on but justified by the low schema coverage.

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 6-param, low-schema-coverage tool with no output schema, the description is thorough on inputs and behavior. It stops short of explaining return values or how the result feeds run_payroll, which is the main remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 17% schema coverage, the description carries the load and does so well: it documents orgnr, year, month, pay_date (YYYY-MM-DD format), and the full nested entries shape (employee_id, gross_cash_ore, benefit_ore, extra_tax_ore, components). It uniquely supplies the kind enum (LON|SEMESTER|OVERTID|...) absent from the schema and explains extra_tax_ore sign semantics (+extra skatt / −jämkning).

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+resource ('Förhandsberäkna en lönekörning') and the exact scope (skatt + arbetsgivaravgift), and the crucial negation 'UTAN att bokföra' separates it from the booking sibling run_payroll. An agent can distinguish this preview-calculation tool from run_payroll 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 Guidelines4/5

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

'UTAN att bokföra' clearly signals the preview-only context (use this to compute, not to post), which distinguishes it from run_payroll. However, no alternative sibling is named explicitly and there is no explicit when/when-not statement, so 4 rather than 5.

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