Skip to main content
Glama

Skapa kreditfaktura

credit_customer_invoice

Skapa en kreditfaktura för en kundfaktura (utkast; negativa belopp, omvänd bokföring vid bokför). Utan rader krediteras hela originalet; ange lines ([{description, quantity_milli?, unit_price_ore, vat_rate, account?}]) för delkreditering. Scope reconcile. Argument: orgnr, invoice_id, invoice_number; valfritt invoice_date, lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNo
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
invoice_idYes
invoice_dateNo
invoice_numberYes

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
Behavior4/5

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

Annotations already establish it is a non-read-only, non-destructive, non-idempotent write. The description adds genuine context beyond that: the result is a draft (utkast), amounts are negative, accounting is reversed at booking time, and the required scope is "reconcile". These are non-obvious behavioral traits the annotations cannot express.

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 front-loaded: the core action leads, followed by behavioral note, lines behavior, scope, and argument list. Every clause carries information, though the argument enumeration at the end partially duplicates the schema.

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 mutation tool with no output schema and sparse schema descriptions, the description covers the important ground: draft state, sign convention, booking reversal, scope, and the lines structure for partial crediting. Minor gaps remain around invoice_id/invoice_date semantics and any permission prerequisites.

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 20% (only orgnr is documented), so the description must carry the load, and it does: it enumerates the arguments (orgnr, invoice_id, invoice_number required; invoice_date, lines optional) and spells out the lines item shape ({description, quantity_milli?, unit_price_ore, vat_rate, account?}). The remaining gap is that invoice_id vs invoice_number semantics are not distinguished.

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 ("Skapa en kreditfaktura för en kundfaktura") that clearly separates it from siblings like create_customer_invoice, cancel_customer_invoice, and book_customer_invoice. The parenthetical adds scope (draft, negative amounts, reversed posting) so the agent knows exactly what operation this is.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains that omitting lines credits the whole original while supplying lines performs partial crediting, which is useful usage guidance. However, it never states when to choose this tool over alternatives such as cancel_customer_invoice or reverse_customer_payment, so routing is only implied.

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