MCP Tool Reference

The hosted connector at https://flomailr.com/api/mcp offers 35 tools when you sign in over OAuth, and 33 when you connect with an API key (the two workspace tools are left out). Your AI app chooses the tools. You normally never name them yourself, but this page shows what exists and what each one needs.

See Connect Your AI to set up the connection.

A design is a Flomailr BlockDoc, a JSON document { version: 1, settings, blocks }. Where a tool takes doc, it accepts the object or a JSON string. You rarely need to write one by hand: compose_email builds it from sections.

Actions such as saving drafts, sending, suppression changes and brand updates are written to the activity log. See Sending Safely with AI.

Design

ToolWhat it doesKey inputs
get_design_kitReturns the themes, the section patterns and your brand kit. Read-only. Call it first when designingnone
compose_emailBuilds a complete email from an ordered list of sections, using a theme and your brand kit. With save it creates a draft and returns its idsections (1 to 20), theme, useBrand, preheader, save: { name, subject, campaignId? }
restyle_emailRe-skins a design into a theme or your brand without changing content or structure. With campaignId it updates the draftcampaignId or doc, theme, useBrand
preview_emailShows the real rendered email in the chat with desktop, mobile and dark views, plus the audit grade and problems. Read-onlycampaignId (preferred) or doc, subject
render_email_previewSupplies the HTML to the preview view. Used by the view itself, not by agentscampaignId or doc, subject
screenshot_emailRenders the email in a real browser and returns screenshots the AI can look at, to check the design itself. Read-onlycampaignId (preferred) or doc, device (desktop or mobile), maxFrames (1 to 4)
get_campaignLoads a campaign. The default outline lists each block's id, type and a one-line summary. Read-onlycampaignId, format (outline or full)
edit_campaignApplies small edits to a draft by block id, all or nothing, and returns the new outline and auditcampaignId, ops (up to 50), subject, name

compose_email sections use these patterns: header, hero, text, features, products, articles, testimonial, stats, cta, event, image, countdown, table, signoff, footer, divider, spacer. Themes: clean, editorial, studio, hearth, midnight, poster, fresh, mono, luxe. Details are in Designing Emails with AI.

edit_campaign operations: update, remove, move, insert, settings, restyle.

Brand

ToolWhat it doesKey inputs
get_brandReturns the workspace brand kit, or null. Read-onlynone
set_brandReplaces the brand kit. Owners and admins onlycolors (primary required), name, websiteUrl, logoUrl, logoWidth (40 to 600), headingFont, bodyFont, baseTheme, voice, socials (up to 10)
import_brand_from_urlReads a website and proposes a brand kit with logo candidates and the evidence for each value. Saves only if asked, and saving needs an owner or adminurl, save (default false)

Campaigns and content

ToolWhat it doesKey inputs
save_campaignSaves a BlockDoc as a draft campaign. Never sends or schedules. Returns the campaign id, a builder link and a gradename, subject, doc, campaignId (to update a draft)
list_campaignsLists campaigns, most recent firststatus (DRAFT, SCHEDULED, SENDING, SENT), limit (default 20, up to 100)
import_html_campaignSaves finished HTML as a draft with the markup stored exactly as given. Does not sendhtml, name, subject, text, campaignId
check_linksFetches every link and image in some HTML or a stored campaign and reports the HTTP status, to catch dead links and blocked imageshtml or campaignId
upload_assetUploads an image to the workspace library and returns a permanent public URL. PNG, JPEG, GIF or WebP up to 5 MB. SVG is refusedfilename, contentBase64
list_assetsLists uploaded images with their URLs, so they can be reusedquery, limit (default 30, up to 100)

Saving, composing and editing only ever touch drafts. A scheduled, sending or sent campaign cannot be changed through the connector.

Drafting tools that need no account data

These work on a design you give them and read nothing from your workspace.

ToolWhat it doesKey inputs
render_emailRenders a BlockDoc to the final email-safe HTML, using the same renderer as the appdoc
render_plaintextRenders a BlockDoc to a plain-text alternativedoc
audit_emailLints a design for deliverability, accessibility, spam risk and content. Returns a 0 to 100 score, an A to F grade and findingsdoc, subject
preview_personalizationFills merge tags from a sample contact and reports which tags resolved, were empty or were unknowndoc, contact (email, firstName, lastName), subject
scaffold_emailBuilds a valid BlockDoc from a compact list of block specs, for when no section pattern fitsblocks, settings
list_block_typesLists every block type with its default propsnone

Workspaces (OAuth only)

ToolWhat it doesKey inputs
list_workspacesLists the workspaces your account belongs to, with contact, list and campaign counts, and which one is activenone
switch_workspacePoints the connector at another workspace. It does not change the workspace open in your browserworkspace (id or exact name)

Sending and safety checks

ToolWhat it doesKey inputs
get_send_policyReturns the server-enforced rules: the daily cap and what is left, blocked domains, the suppression check, quiet hours, and whether dry run is forcednone
check_send_readinessA go, caution or no-go report on domain authentication (SPF, DKIM, DMARC), the sending provider's account health, recent bounce and complaint rates against the suspend thresholds, and monthly quotadomain (defaults to your custom domain)
score_emailScores spam and compliance risk of a draft: trigger phrases, image-to-text ratio, link count, subject problems, unsubscribe handlingdoc, subject, hasListUnsubscribe
check_complianceChecks a campaign or draft for CAN-SPAM and GDPR readiness: unsubscribe, postal address, sender identity and, with a list, recorded consentcampaignId, or doc and subject, plus physicalAddress, listId
send_campaignSends an existing campaign to its list through the guarded pipeline. Dry run by defaultcampaignId, dryRun (default true), confirm, overrideQuietHours, idempotencyKey
send_emailSends a personal or one-to-one email to 1 to 5 recipients. Dry run by defaultto, subject, one of doc, html or body, replyTo, dryRun (default true), confirm, idempotencyKey

How the guards work is on Sending Safely with AI.

Audience and results

ToolWhat it doesKey inputs
get_campaign_performanceReturns a sent campaign's sends, opens, clicks, bounces, complaints and unsubscribes with rates, any A/B split, and a suggested next stepcampaignId
get_recipient_engagementReturns a group of recipients (hard bounced, complained, clicked, or did not open) with suggested suppressionscohort (bounced, complained, unengaged, clicked, all), campaignId, limit (default 100, up to 500)
manage_suppression_listLists or checks the suppression list, or adds or removes addresses. Adding and removing need confirm: true and an owner or admin over OAuthaction (list, check, add, remove), emails, reason, note, confirm, idempotencyKey
get_action_logReturns the audit trail of tool actions, filterable by action, campaign and timeaction, campaignId, since (ISO time), limit (default 50, up to 200)

get_recipient_engagement needs a campaignId for the clicked and unengaged groups. Suppression reasons are MANUAL, HARD_BOUNCE, COMPLAINT and GLOBAL_UNSUBSCRIBE, and MANUAL is the default.

Prompt

The connector also offers one prompt, design_email. It takes a brief and walks the AI through the design workflow: read the design kit, pick a theme, compose, preview, and fix any errors. It tells the AI not to send anything without your explicit go-ahead.

The email preview

preview_email shows the email inside the chat as an interactive view. Your AI app has to support interactive MCP views for it to appear. Claude does, and asks you to allow it the first time. If a client cannot show it, the tool also returns a link that opens the draft in the visual builder.