Skip to main content
Glama

Backa leverantörsbetalning

reverse_supplier_payment

Backar den senast registrerade betalningen på en leverantörsfaktura med ett motverifikat, så att fakturan blir obetald igen. Använd när en betalning har registrerats fel eller inför makulering med cancel_supplier_invoice; för att registrera en betalning, använd register_supplier_payment. Returnerar fakturan med nytt saldo och status. Bieffekt: ett omvänt betalningsverifikat bokförs och originalet ligger kvar. Ger ett fel om fakturan saknar betalning. Kräver behörigheten book.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
invoice_idYesLeverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / invoice_id / description
      Added value: +"Leverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices."
  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.7/5.0
Behavior5/5

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

Annotations only give the generic safety flags (readOnly=false, destructive=false, idempotent=false); the description adds real behavioral context beyond them: a reversing voucher is posted while the original entry remains, an error is returned if the invoice has no payment, and the 'book' permission is required. This is consistent with destructiveHint=false since the original is retained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four dense sentences with zero filler, front-loaded with the action and effect before routing guidance and edge cases. Every sentence contributes a distinct fact.

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

Completeness5/5

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

For a non-idempotent mutation with no output schema, the description covers the return value (invoice with new balance and status), the side effect, the error condition, and the required permission. An agent has everything needed to call it correctly.

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

Parameters3/5

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

Schema coverage is 100% and both parameters (orgnr, invoice_id) already carry format examples and pointers to list_companies/list_supplier_invoices. The description adds no parameter-level detail, so the baseline 3 applies.

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 ('Backar den senast registrerade betalningen på en leverantörsfaktura med ett motverifikat') including the scope limitation of only the most recent payment. It clearly distinguishes itself from register_supplier_payment, cancel_supplier_invoice, and reverse_customer_payment, so an agent can pick it without opening a schema.

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?

Explicitly names both when to use it (when a payment was registered incorrectly, or as a prerequisite step before cancel_supplier_invoice) and the alternative for the opposite operation (register_supplier_payment). Nothing is left to inference.

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