Skip to main content
Glama

Send document by e-mail

email_invoice
DestructiveIdempotent

Sends the issued invoice or proforma summarised by prepare_email_invoice by e-mail once the user has confirmed it, using its confirmation token and the same recipients and mode: each recipient gets its own e-mail from the company via EnKonto, with the reply-to address of the user. An e-mail can't be taken back. Refused, with the token used up, when the token expired or doesn't match, or the document changed after the preparation. A repeated call with the same token returns the same answer without sending again.

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": {
      "company_id": "<company_id>",
      "invoice_id": "<invoice_id>",
      "confirmation_token": "<confirmation_token>",
      "emails": "<emails>",
      "mode": "<mode>"
    },
    "name": "email_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesLINK: the e-mail has a link to a page with the PDF of the document (openings are tracked); ATTACHMENT: the PDF is attached to the e-mail (openings are not tracked).
emailsYesThe recipients: 1 to 5 different e-mail addresses; each gets its own e-mail. A document can be sent to at most 5 different addresses in total, and to one address at most 2 times.
company_idYesThe id of the company, from list_companies.
invoice_idYesThe id of the issued invoice or proforma, from list_invoices.
confirmation_tokenYesThe confirmation_token of the answer of prepare_email_invoice for this document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: irreversibility ("An e-mail can't be taken back"), the token lifecycle (used up on refusal, expiry, mismatch, document mutation), and idempotent replay semantics (same token returns the same answer without re-sending). It also discloses outbound-facing details the annotations cannot convey — each recipient receives an individual e-mail from the company with the user's reply-to address. This is consistent with, and enriches, destructiveHint=true and idempotentHint=true.

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?

An opening sentence carries purpose, provenance, and parameters; subsequent sentences cover irreversibility, failure modes, and replay in order of importance. Every clause carries information and none restates the name or title.

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 destructive, outbound-communication tool with no output schema, the definition covers prerequisites, failure semantics, and idempotency well. The only gap is the shape of the returned answer on success — mentioned only obliquely via the repeated-call case — which an agent might want to know before reporting results.

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 100%, so the baseline is 3, but the description adds real meaning: confirmation_token must come from prepare_email_invoice, and emails/mode must match what was prepared. That constrains how the parameters may be populated in a way the schema does not state.

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 concrete verb and resource — sends the issued invoice or proforma by e-mail — and ties it explicitly to the prepare_email_invoice sibling that produced its confirmation token. Per-recipient delivery, sender identity (EnKonto), and reply-to are all named, so the agent can distinguish this from prepare_email_invoice and send_invoice_to_ksef 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 Guidelines4/5

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

Makes the precondition explicit: the document must first be summarised by prepare_email_invoice and confirmed by the user, and the call must reuse that token, recipients, and mode. The refusal conditions (expired/mismatched token, document changed after preparation) tell the agent when the call will fail and thus when to re-prepare. It stops just short of an explicit 'do not call this before prepare_email_invoice' prohibition, but the ordering is unambiguous.

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