Skip to main content
Glama

Edit email template

spur_update_email_template
Idempotent

Edit one of the user's email templates and show the updated inbox preview. For tweaks pass replacements (exact find → replace in "html", "subject" or "text"); to redesign pass full html. When the HTML changes, the plain-text version is regenerated unless it was hand-written or you pass text_body. Workflows using this template send the new version from their next step.

Example: replacements=[{target:"html", find:"<p style="margin:0 0 16px;">", replace:"<p style="margin:0 0 16px;">I'd like to make a cash offer on {{property_address}}."}]

Email HTML guidance (see spur://email-design-guide): full HTML document, table-based layout 600px wide, inline styles on elements (a small block in is fine for resets/media queries), web-safe font stacks, no JavaScript, no forms, no external CSS. Images as absolute https URLs with alt text and width attributes. The user's own images (logo, headshot, property photos): spur_list_images gives their URLs; if they want to use an image they have, call spur_upload_image (or spur_save_image for a link) and use the saved URL. Use PNG or JPG in emails, not SVG. A hidden preheader right after sets the inbox snippet. Include an opt-out line ("Reply STOP" or an unsubscribe link) and the sender's postal address in the footer. Keep it under 50,000 characters. Use merge fields like {{owner_first_name}}, {{property_address}}, {{your_name}}, {{your_phone}}, {{company_name}} (see spur://merge-variables). The plain-text version is generated from the HTML unless you pass text_body.

Input Schema

NameRequiredDescriptionDefault
htmlNoFull replacement HTML
nameNoNew template name
subjectNoNew subject line
text_bodyNoFull replacement plain-text version
is_defaultNotrue = make this the user's default template for its channel
descriptionNoInternal note about the template; never sent to owners
template_idYesEmail or SMS template id (UUID from a Spur list/search tool)
replacementsNoSmall edits applied in order instead of resending the full content

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare non-destructive, idempotent, closed-world writes. The description adds real behavioral context beyond them: the plain-text version is regenerated unless hand-written or `text_body` is passed, workflows pick up the new version from their next step, and the 50,000-character ceiling. Minor tension with idempotentHint: replacements require `find` to occur exactly once, so replaying a call would fail rather than no-op.

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?

The editing behavior is front-loaded in the first three sentences, but roughly two-thirds of the text is an email HTML style guide (tables, preheaders, opt-out lines, merge fields) that overlaps heavily with the referenced spur://email-design-guide and spur://merge-variables resources. Useful content, but bloated for a tool definition and reusable across the create-template siblings.

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 an 8-parameter mutation with no output schema, this covers the essentials: what changes, how text regeneration works, downstream workflow effects, size limits and content constraints. One gap: the description calls it an email-template tool while the schema says `template_id` is an 'Email or SMS template id', leaving the SMS case unexplained given a separate spur_update_sms_template exists.

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 genuinely adds meaning: it explains that `replacements` target 'html', 'subject' or 'text', that `find` is an exact match, and how `html` vs `text_body` interact. It leaves `name`, `description` and `is_default` entirely to the schema, which is acceptable given full coverage.

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 specific verb and resource ('Edit one of the user's email templates') plus the visible outcome ('show the updated inbox preview'). The 'email' qualifier distinguishes it from the sibling update tools for letter, postcard and SMS templates without ambiguity.

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 explicit branch guidance: use `replacements` for tweaks, full `html` for a redesign, and pass `text_body` to override regeneration. It also routes the agent to spur_list_images / spur_upload_image / spur_save_image when the user wants their own assets, though it never says when to prefer spur_create_email_template over editing.

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