Skip to main content
Glama

Makulera kundfaktura

cancel_customer_invoice
DestructiveIdempotent

Makulera en kundfaktura (obetald → backar bokföringsverifikatet). Ett utkast makuleras utan bokföring. En bokförd kreditfaktura kan makuleras så länge inget återbetalats; kvittningen mot originalet backas då. En faktura med kreditfaktura makuleras inte förrän krediten är makulerad. Scope book. Argument: orgnr, invoice_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>",
      "invoice_id": "<invoice_id>"
    },
    "name": "cancel_customer_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
invoice_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

A3.9/5.0
Behavior4/5

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

Annotations declare destructiveHint and idempotentHint, but the description adds the crucial accounting effects: voucher reversal for unpaid invoices, no bookkeeping for drafts, and reversal of the offset against the original for credited invoices. This is real value beyond the safety flags, only slightly shy of complete since it doesn't state permission requirements or failure responses.

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-loads the main action, then enumerates the state-dependent rules efficiently in compact sentences. The trailing 'Scope book. Argument: orgnr, invoice_id' is low-value filler but harmless.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, state-dependent mutation this covers the accounting consequences well, and no output schema means return values needn't be explained. However, the undocumented invoice_id parameter and absence of failure/permission behavior leave a noticeable gap.

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 50%: orgnr is well documented in the schema, but invoice_id has no description at all. The description only restates 'Argument: orgnr, invoice_id' without clarifying what invoice_id refers to or how to obtain it, so it fails to compensate for the missing schema documentation.

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 resource ('Makulera en kundfaktura') and immediately distinguishes sub-cases: draft cancellation without bookkeeping, unpaid reversing the voucher, and credit invoice with offset reversal. This clearly separates it from sibling cancel_supplier_invoice and credit_customer_invoice.

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?

Gives concrete preconditions: drafts cancel without bookkeeping, booked credit invoices only if nothing refunded, and invoices with a credit cannot be cancelled until the credit is cancelled. These conditions effectively guide when the tool succeeds, though it doesn't explicitly name an alternative operation (e.g., credit_customer_invoice) when cancellation is not allowed.

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.