Skip to main content
Glama

Generate email

generate_email
Destructive

Render one branded email in a brand kit and save it to the user's files: any email the user describes, from a cold intro or a follow-up to a newsletter, an invitation, a launch note or a receipt. Nothing is sent. Drafts are limited to 20 per day. Templates: 'letter' takes preheader, signoff, footer_note; 'announcement' takes headline (required), preheader, cta_label, cta_url, signoff, footer_note; 'newsletter' takes issue_label, headline (required), preheader, cta_label, cta_url, signoff, footer_note; 'invitation' takes invite_label, event_name (required), when, where, preheader, cta_label, cta_url, signoff, footer_note; 'notification' takes status_label, headline (required), cta_label, cta_url, footer_note; 'onboarding' takes headline (required), preheader, cta_label, cta_url, signoff, footer_note; 'receipt' takes headline (required), order_label, order_date, cta_label, cta_url, footer_note. Pick the template whose shape fits the job and write the subject, props and body yourself in the user's voice; the template is a layout, not a limit on what the email can say. Write the body as markdown (paragraphs, lists, links, tables) or as blocks, never both. header 'band' paints the header in the brand color, 'plain' keeps it white; align is left or center; both default to the template's layout. Leave brand_kit_id out to use the space's default brand. It costs 1 credit, or nothing on a Solo or Pro plan. Returns the artifact id; call draft_email_in_gmail with it. Do not call this again to retry.

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": {
      "template_id": "<template_id>"
    },
    "name": "generate_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
alignNoThe text alignment. Left out it is the template default.
propsNoText fields for the template, all strings.
blocksNoThe body as blocks.
headerNoThe email header style. Left out it is the template default.
subjectNoThe subject line.
markdownNoThe body as markdown.
template_idYesThe template to render. plan_generation lists each one.
brand_kit_idNoA brand_kit_id from list_brand_kits.
saved_template_idNoA saved_template_id from list_templates; its inputs seed the ones you pass.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / align / description
      Added value: +"The text alignment. Left out it is the template default."
    • addedInput schema / properties / header / description
      Added value: +"The email header style. Left out it is the template default."
    • addedInput schema / properties / template_id / description
      Added value: +"The template to render. plan_generation lists each one."
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • addedInput schema / properties / saved_template_id
      Added value: +{
      +  "description": "A saved_template_id from list_templates; its inputs seed the ones you pass.",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "template_id",
      -  "subject"
      -]New value: +[
      +  "template_id"
      +]
  6. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: states a 20-per-day draft cap, a 1-credit cost that is free on Solo/Pro, and that the artifact id is returned for a downstream call. The "do not retry" instruction discloses a retry hazard the annotations don't capture.

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?

Purpose, cost, and next step are front-loaded and every sentence carries information. The template enumeration is long but earns its space given the untyped props object; the run-on sentence between template list and body-format rules could be split.

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 nine-parameter, nested-body generation tool with no output schema, the description covers input shape, cost, rate limits, and the return value. Body-format constraint (markdown XOR blocks) is stated explicitly, which the schema alone would not make obvious.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but props is a free-form string map in the schema, and the description enumerates exactly which props each of the seven templates accepts, marking required ones. It also explains the default behavior for header, align, and brand_kit_id, which the schema only gestures at.

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?

"Render one branded email in a brand kit and save it to the user's files" gives a specific verb, resource, and destination, and enumerates the email types it covers. It is immediately distinguishable from send_email or draft_email_in_gmail.

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?

"Nothing is sent" plus "call draft_email_in_gmail with it" and "Do not call this again to retry" give clear routing and a failure-handling rule. It lacks an explicit comparison to sibling generators such as generate_substack_post, so it stops short of full alternative guidance.

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.