Skip to main content
Glama

Ångra årsavslutssteg

undo_year_end_step
Destructive

Ångra ett årsavslutssteg. Ett BOKFÖRT steg backas med en VÄNDANDE bokning (spegelverifikat i samma serie — originalet rörs aldrig) och steget återöppnas; ett KVITTERAT steg återställs till pending. Stegen återställs i omvänd ordning: är ett senare steg avklarat nekas anropet, om inte cascade=true, som först återställer alla senare avklarade steg (sista först) i en transaktion. Visa användaren vilka steg som återställs innan du sätter cascade. Kräver scope book. Argument: orgnr, year, step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat); valfritt cascade.

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": "undo_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.
cascadeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / cascade
      Added value: +{
      +  "default": false,
      +  "title": "Cascade",
      +  "type": "boolean"
      +}
  2. 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."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: a booked step is reversed via a mirror voucher in the same series while the original is never touched, a confirmed step is reset to pending, and cascade restores later steps last-to-first inside a transaction. It also discloses the required 'book' scope, which the annotations do not convey.

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?

Dense but well-ordered: purpose, then per-state behavior, then ordering/cascade rules, then scope, then argument recap. The trailing 'Argument:' list largely restates the schema, but the inline enum values there still earn their place.

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, non-idempotent mutation with no output schema and low schema coverage, the definition covers side effects, ordering constraints, transactionality, and auth scope. Only the response shape / what the caller gets back is left unstated.

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 25% (only orgnr documented), but the description compensates by enumerating the four allowed step values (periodiseringar, dispositioner, aktuell_skatt, arets_resultat) and explaining cascade's transitive reset behavior. The meaning of 'year' (fiscal vs. calendar) is never clarified, which is the remaining 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 opening sentence states a specific verb and resource ('Ångra ett årsavslutssteg') and immediately distinguishes the two underlying states it operates on (BOKFÖRT vs KVITTERAT). This lets an agent separate it from book_year_end_step and skip_year_end_step without opening any 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?

It clearly states the blocking condition — a later completed step causes the call to be denied — and names the escape hatch (cascade=true), plus tells the agent to show the user which steps will be reset before setting cascade. What's missing is any explicit cross-reference to sibling tools for the forward/booked path.

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.