Skip to main content
Glama

Skicka kundfaktura med e-post

send_customer_invoice
Destructive

Skickar en BOKFÖRD kundfaktura (eller kreditfaktura) som PDF med e-post till kunden. Avsändare är bolagets namn, och kundens svar går till bolagets e-post. Bekräfta alltid mottagarens adress och att fakturan ska skickas med användaren innan du anropar; ett mejl går inte att ta tillbaka. Adresser som studsat spärras, och det finns ett tak per dag. En faktura skickas bara när bolaget har betalningsuppgifter (bankgiro, plusgiro, bankkonto eller IBAN). Fakturan ändras inte av utskicket; PDF:en som skickades sparas på utskicket. Mottagaren sparas som kundens e-postadress bara med save_customer_email=true (fråga användaren). Scope book. Argument: orgnr, invoice_id, to (e-postadress); valfritt message (text i mejlet), save_customer_email.

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>",
      "to": "<to>"
    },
    "name": "send_customer_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
messageNo
invoice_idYes
save_customer_emailNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / save_customer_email
      Added value: +{
      +  "default": false,
      +  "title": "Save Customer Email",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (destructive/openWorld): the email cannot be recalled, bounced addresses are blocked, there is a per-day cap, the invoice itself is not modified, the sent PDF is stored on the send, sender/reply-to is the company, and the recipient is only persisted with save_customer_email=true. These are exactly the side effects an agent needs before an irreversible action.

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: purpose first, then the confirmation requirement, then constraints, then argument list. Several clauses (bounce blocking, daily cap, PDF storage) are packed into one paragraph, which is slightly heavy but each sentence carries actionable information.

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 an irreversible, open-world mutation with no output schema, the description covers prerequisites, irreversibility, rate limits, and persistence side effects. It stops short of saying what the call returns (e.g., a send record id), which would have closed the last gap.

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 description coverage is only 20% (only orgnr documented), but the description compensates by explaining that `to` is the recipient e-mail, `message` is free text in the mail body, and `save_customer_email` controls persistence of the address with an instruction to ask the user. `invoice_id` type/source is left implicit, and scope "book" is mentioned without elaboration.

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?

"Skickar en BOKFÖRD kundfaktura (eller kreditfaktura) som PDF med e-post till kunden" states a specific verb (send), a specific resource (booked customer invoice / credit invoice), and the delivery channel. This clearly separates it from create_customer_invoice, book_customer_invoice, and send_payment_reminder in the sibling list.

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?

Explicit preconditions are given: the invoice must already be booked, the company must have payment details (bankgiro/plusgiro/bankkonto/IBAN), the agent must confirm the recipient address and intent with the user, and must ask about save_customer_email. It does not explicitly name sibling alternatives it replaces, which keeps it just short of a 5.

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