Skip to main content
Glama

Samuelz® Communications

Neue E-Mail zur Freigabe vorbereiten

prepare_email
Idempotent

Prepare an explicitly requested new outbound email, not an inbound reply. First preview_email with the same requestKey UUID and exact to/from/subject/body/attachments; from is optional and must be an eligible address from list_email_senders. Returns the immutable operation identity/contentHash for actual owner-chat approval, never an approval itself. Reuses the existing tenant mail workflow and immutable reply operation store, without a fake inbound thread or CRM contact. Keep the same requestKey for retries; changed sender/recipient/content/attachment conflicts. Does not send. Present final from/to/subject/body and attachment filenames, byte sizes and SHA256. Record only the human owner's exact approval with approve_reply using the returned operationId/contentHash and real decision evidence, then execute_reply on that same operation. Existing get_operation/list_reply_operations/cancel_reply provide recovery. New email currently uses chat approval only; no browser or card approval with invisible attachments. Never replay processing, submitted or ambiguous outcomes, or change keys to bypass them. No automatic grants, sender changes, marketing campaigns or recipient substitution.

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": {
      "requestKey": "<requestKey>",
      "to": "<to>",
      "subject": "<subject>",
      "body": "<body>"
    },
    "name": "prepare_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesOne explicitly supplied recipient mailbox, without display names, lists, Cc or Bcc. It is normalized to lowercase and checked for suppression.
bodyYesFinal authored body, at most 12000 characters with nonblank content. Preserve the normalized preview text for preparation and human approval; this is not approval evidence.
fromNoOptional exact confirmed sender or explicitly requested address on a confirmed tenant sending domain from list_email_senders; omission retains the current default, never invent an alias.
subjectYesFinal subject of the exact new email, at most 500 characters and no CR/LF/NUL. Surrounding whitespace is normalized; not a generation instruction.
requestKeyYesOne UUID for this explicitly requested new email. Reuse it and identical content in preview_email/prepare_email; another key never authorizes replay of an uncertain send.
attachmentsNoUp to 3 explicitly supplied attachments, unique filenames and at most 65536 decoded bytes combined. Omit for no attachments; preserve bytes and names through preview, preparation and exact owner approval.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / attachments / description
      Added value: +"Up to 3 explicitly supplied attachments, unique filenames and at most 65536 decoded bytes combined. Omit for no attachments; preserve bytes and names through preview, preparation and exact owner approval."
    • addedInput schema / properties / attachments / items / properties / content / description
      Added value: +"Canonical padded base64 of the supplied original bytes, without a data-URL prefix or remote URL. Decoded bytes count toward the shared 64 KiB limit."
    • addedInput schema / properties / attachments / items / properties / contentType / description
      Added value: +"Actual attachment MIME type as type/subtype without parameters, not a guessed file extension."
    • addedInput schema / properties / attachments / items / properties / filename / description
      Added value: +"Exact nonempty attachment filename, at most 180 characters, without CR/LF/NUL and unique within this email; shown to the owner for approval."
    • addedInput schema / properties / body / description
      Added value: +"Final authored body, at most 12000 characters with nonblank content. Preserve the normalized preview text for preparation and human approval; this is not approval evidence."
    • addedInput schema / properties / from / description
      Added value: +"Optional exact confirmed sender or explicitly requested address on a confirmed tenant sending domain from list_email_senders; omission retains the current default, never invent an alias."
    • addedInput schema / properties / requestKey / description
      Added value: +"One UUID for this explicitly requested new email. Reuse it and identical content in preview_email/prepare_email; another key never authorizes replay of an uncertain send."
    • addedInput schema / properties / subject / description
      Added value: +"Final subject of the exact new email, at most 500 characters and no CR/LF/NUL. Surrounding whitespace is normalized; not a generation instruction."
    • addedInput schema / properties / to / description
      Added value: +"One explicitly supplied recipient mailbox, without display names, lists, Cc or Bcc. It is normalized to lowercase and checked for suppression."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses that this does not send, returns an immutable operation identity/contentHash rather than an approval, reuses the existing tenant mail workflow, and enforces requestKey retry semantics with conflicts on changed sender/recipient/content/attachment. It also warns against replaying processing, submitted or ambiguous outcomes and against changing keys to bypass them, which is substantial behavioral context the annotations do not carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the primary sequence are front-loaded, which is good, but the text is a dense run-on of many negative constraints and workflow asides. Several clauses (marketing campaigns, recipient substitution, fake CRM contact) could be compressed or grouped without losing information.

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?

For a six-parameter mutation tool with no output schema, the description covers the full lifecycle: preview, prepare, human approval, execution, recovery, and error/replay semantics. An agent has everything needed to call it correctly and know what it must not do.

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: 'from' must be an eligible address from list_email_senders, requestKey must match the preview call, and attachments are surfaced to the owner with filenames, byte sizes and SHA256. It stops short of explaining per-field normalization or suppression outcomes, which the schema already covers.

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 first sentence states a specific verb and resource and immediately disambiguates scope: 'Prepare an explicitly requested new outbound email, not an inbound reply.' This cleanly separates it from prepare_reply and draft_reply, which handle replies, without requiring the agent to open either schema.

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?

The description lays out an explicit ordered workflow (preview_email with the same requestKey, then prepare_email, then approve_reply with the returned operationId/contentHash, then execute_reply) and names recovery alternatives get_operation/list_reply_operations/cancel_reply. It also states when not to use it ('not an inbound reply', 'no browser or card approval').

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