Skip to main content
Glama

Prepare sending a document by e-mail

prepare_email_invoice

Checks that an issued invoice or proforma can be sent by e-mail to the given addresses and returns a summary of the e-mail for the user's confirmation: the recipients (each marked when it is not the contact e-mail of the customer on the document), the sender name, the reply-to address, the subject, the link or the attached PDF and the earlier e-mails of the document, with a one-time confirmation token valid for 10 minutes. Nothing is sent.

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>",
      "emails": "<emails>",
      "mode": "<mode>"
    },
    "name": "prepare_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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, destructiveHint=false and idempotentHint=false, so the safety profile is partly given. The description adds genuinely useful behavior: nothing is sent, a one-time confirmation token valid for 10 minutes is issued, and recipients that are not the customer's contact e-mail are flagged. It does not say what state the token creates or what invalidates/replaces a previously issued token.

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?

Front-loaded with the action, then a colon list of returned items, then a one-line safety clause ('Nothing is sent'). The sentence is long and list-heavy but every element carries information; no filler.

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?

There is no output schema, and the description compensates by describing the returned summary in detail, including the token and its 10-minute validity. Combined with the fully documented four-parameter schema, an agent has everything needed to call this correctly and interpret the response.

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 3 is the baseline, but the description adds meaning beyond the schema: the recipient list maps to the returned summary with non-contact addresses flagged, and 'the link or the attached PDF' frames the LINK/ATTACHMENT choice in outcome terms. It adds interpretation without duplicating the enum documentation.

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?

The description opens with a specific verb and resource: 'Checks that an issued invoice or proforma can be sent by e-mail to the given addresses.' It goes further and enumerates exactly what is returned (recipients, sender, reply-to, subject, link/PDF, earlier e-mails), making it unmistakably distinct from a real send operation, reinforced by 'Nothing is sent.'

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?

Usage context is clear: this is the pre-flight check that produces a summary 'for the user's confirmation,' so the agent knows to call it before sending. The implicit next step (a confirming send tool) is not named explicitly, so the alternative is inferred rather than stated.

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