Skip to main content
Glama

Hämta kundfaktura

get_customer_invoice
Read-onlyIdempotent

Hämtar en kundfaktura med alla uppgifter. Använd när du har fakturans id och behöver detaljer; för att hitta fakturor eller se flera, använd list_customer_invoices, och för obetalt per kund, använd customer_outstanding. Returnerar kund, fakturanummer, fakturadatum och förfallodag, rader, belopp och moms i öre, kvarvarande saldo, status (status_label i ord, som i appen) och verifikatnummer, mailings (alla utskick och påminnelser med mottagare och tid, samt studsar och skräppostanmälningar), och för ROT/RUT köparna med personnummer maskerat till födelsedatum (ÅÅÅÅMMDD-XXXX). Läser bara, ändrar inget.

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": "get_customer_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
invoice_idYesKundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / invoice_id / description
      Added value: +"Kundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices."
    • 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.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered; the closing line 'Läser bara, ändrar inget' largely restates it. However, the description adds real behavioral context beyond annotations: the data is returned in öre, personnummer are masked to ÅÅÅÅMMDD-XXXX for ROT/RUT buyers, and mailings include bounces and spam reports — privacy-relevant traits 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?

Usage guidance is front-loaded before the return-value inventory, which is the right ordering. The return enumeration is long, but since there is no output schema each listed field (belopp i öre, kvarvarande saldo, status_label, verifikatnummer, mailings, masked personnummer) carries informational weight rather than padding.

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?

With no output schema, the description carries the burden of explaining return content and does so thoroughly and specifically, including units and masking behavior. Combined with fully documented parameters and read-only annotations, an agent has everything needed to call and interpret this tool.

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 description coverage is 100%, with both orgnr and invoice_id documented including formats and how to obtain them via list_companies and list_customer_invoices. The description only mentions 'fakturans id' and adds no format or validation detail beyond the schema, so the baseline of 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 ('Hämtar en kundfaktura med alla uppgifter') and immediately distinguishes itself from two siblings, list_customer_invoices and customer_outstanding. An agent can tell exactly which tool retrieves a single invoice by id.

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?

Explicit when-to-use ('Använd när du har fakturans id och behöver detaljer') plus named alternatives with their selecting conditions: listing several invoices versus per-customer outstanding balances. No inference left to the agent.

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.