Skip to main content
Glama

Draft an email

draft_email
Idempotent

Draft one email to a contact. Drafts are auto-approved by default (the operator can switch approval on for the workspace or for you; then the draft waits in their Approvals inbox). Approved mail that cannot be sent to the recipient yet waits in the operator's To send list and the response says so. Refuses with contact_suppressed when the contact replied, unsubscribed or bounced. One recipient per message, plain text, no attachments. Accepts only contact_id (or to), subject, body and an optional note (your one-line reason for writing it, up to 500 characters, shown to the operator on the approval card): any other argument is rejected with unknown_field. The response carries warnings (codes: open_draft_exists when another unsent draft to the same contact exists, emailed_N_days_ago when mail went out in the last 3 days, contact_status_) and prior_emails; check them before drafting a second message to the same person. Requires the draft_email scope.

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

Input Schema

NameRequiredDescriptionDefault
toNoOr the contact's email address.
bodyYesPlain-text body. The platform adds the sender identity and unsubscribe footer.
noteNoOptional: why you wrote this draft, in one sentence. The operator sees it next to the draft.
subjectYesSingle-line subject.
contact_idNoContact id.
idempotency_keyNoOptional. Repeating a call with the same key and the same arguments returns the first result instead of writing again, so retries are safe.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / note
      Added value: +{
      +  "description": "Optional: why you wrote this draft, in one sentence. The operator sees it next to the draft.",
      +  "type": "string"
      +}
  2. 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: the auto-approval default and workspace-level override, what happens to approved-but-unsendable mail (To send list), the exact refusal code, rejection of unknown fields, and the warning code vocabulary returned. Annotations only supply safety hints; the description supplies the entire workflow and failure model.

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?

Every sentence carries operational information and the action leads. The long parenthetical about approval overrides and the nested warning-code list make it dense and slightly harder to scan, but nothing is 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?

For a mutation tool with no output schema, the description covers the response shape (warnings with named codes, prior_emails), the auth requirement (draft_email scope), and the full refusal/approval lifecycle. An agent has what it needs to call correctly and interpret the result.

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 constraints the schema omits: the note is capped at 500 characters and is surfaced to the operator on the approval card, plus the closed-set argument list enforced by unknown_field. It does not mention idempotency_key directly, relying on the schema and idempotentHint annotation.

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?

Opens with a specific verb and resource: "Draft one email to a contact," and immediately bounds the scope (one recipient, plain text, no attachments). No sibling tool in the list drafts mail, so the agent can place this decisively.

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?

Gives concrete when-not conditions (contact_suppressed when the contact replied, unsubscribed or bounced) and instructs the agent to check warnings and prior_emails before drafting a second message to the same person. It never names an alternative sibling tool, which keeps it below a 5, but the operating context is clear.

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