Skip to main content
Glama

Backa lönekörning

reverse_payroll_run
Destructive

Backa en bokförd lönekörning: omför löneverifikatet (spegelverifikat) och utesluter körningen ur AGI. Historiken bevaras (status → reversed). Kräver scope payroll. Argument: orgnr, run_id.

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>",
      "run_id": "<run_id>"
    },
    "name": "reverse_payroll_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
run_idYes

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.1/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description explains exactly what happens: a mirror voucher is posted, the run is excluded from AGI, and historical data is preserved with status changed to reversed. It also discloses the required payroll scope, which is valuable operational context for a destructive financial action.

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?

The description is compact and front-loads the core action and its effects, with the scope requirement and arguments following logically. The final 'Argument: orgnr, run_id' sentence adds little beyond the schema but is not enough to undermine the overall efficiency.

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 destructive payroll reversal with no output schema, the description covers the key behavioral outcomes, authorization requirement, and status change. It leaves minor gaps around how to retrieve run_id and what the response contains, but the core information an agent needs to invoke it correctly is present.

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

Parameters2/5

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

Schema coverage is only 50%: orgnr is fully documented in the schema, but run_id has no description anywhere. The description merely repeats 'Argument: orgnr, run_id' without explaining what a run_id is, how to obtain it, or what format it takes, so it does not compensate for the schema gap.

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?

The description uses a specific verb, 'Backa' (reverse), and a precise resource, 'en bokförd lönekörning', and explains the operational effects: mirror voucher, exclusion from AGI, and status becoming reversed. This clearly distinguishes it from run_payroll and list_payroll_runs without needing to name them.

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?

The phrase 'bokförd lönekörning' implies the run must already be booked, and 'Kräver scope payroll' states an explicit authorization prerequisite. However, it does not name an alternative or say how to locate the run_id, so it stops short of full when/when-not guidance.

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.