Skip to main content
Glama

Omför verifikat

reverse_voucher
Destructive

Rätta ett verifikat genom att bokföra ett spegelverifikat (omvända tecken) i en öppen period, originalet lämnas orört (append-only). Använd t.ex. för att rätta en post vars period är låst. Koden bokför och validerar. Kräver scope book. Argument: orgnr, voucher_id; valfritt date (YYYY-MM-DD, default idag). Verifikat som hör till en modul (kund- och leverantörsfakturor och deras betalningar, lön, ROT/RUT-utbetalningar, momsomföring, avyttring och bokslutssteg) nekas: ändra dem i modulen (credit_customer_invoice, cancel_customer_invoice, cancel_supplier_invoice, reverse_customer_payment, reverse_supplier_payment, reverse_payroll_run, reverse_rot_rut_payout, undo_year_end_step). Avskrivningar och vanliga verifikat vänds här.

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>",
      "voucher_id": "<voucher_id>"
    },
    "name": "reverse_voucher"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNo
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
voucher_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.7/5.0
Behavior5/5

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

Goes well beyond the annotations: the original is never modified (append-only), the mirror entry must land in an open period, the server validates and books, and the call requires the 'book' scope. The annotations only declare destructive=true/non-idempotent; the description supplies the actual mutation semantics and authorization prerequisite.

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?

Single dense paragraph, front-loaded with the mechanism and use case before the exclusion list, and every clause carries information. It is on the long side for a three-parameter tool, but the length is driven by the genuinely needed module-exclusion routing rather than filler.

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, the description covers the mechanism, preconditions (open period, book scope), and alternatives. It omits what the call returns (e.g. the new mirror voucher's id) and failure behavior, which would help an agent chain follow-up calls.

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 coverage is only 33%, so the description carries real weight: it labels orgnr and voucher_id as required, marks date optional, and adds the YYYY-MM-DD format plus the 'default today' behavior that the schema's null default does not convey. It still does not explain what voucher_id refers to (e.g. series/number within a fiscal year), so it falls short of fully compensating.

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 and mechanism: correct a voucher by booking a mirror voucher with reversed signs, leaving the original untouched. It also draws an explicit boundary against module-owned vouchers (customer/supplier invoices, payroll, ROT/RUT, VAT, year-end) versus ordinary vouchers and depreciation, which are reversed here.

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?

Gives a concrete use case (correcting a posting in a locked period) and an explicit when-not list with the exact alternative tool for each module case (credit_customer_invoice, cancel_supplier_invoice, reverse_payroll_run, undo_year_end_step, etc.). The routing decision is fully determined by the text.

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.