refine_email
Modify a generated email using natural language feedback, targeting specific sections like header, hero, or CTA. Use version history to undo or branch changes.
Instructions
Iterate on a previously generated email. Provide natural language feedback to modify the design. Supports section-level targeting (header, hero, body, cta, footer) and version history for undo.
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": {
"email_id": "<email_id>",
"feedback": "<feedback>"
},
"name": "refine_email"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mjml | No | The current MJML of this email. Required on first refinement since generate_email returns instructions, not MJML. On subsequent refinements, the stored MJML is used if this is omitted. | |
| section | No | Target a specific section: header, hero, body, features, cta, testimonial, footer. If omitted, the AI modifies the entire email. | |
| version | No | Revert to a specific version number before applying this refinement. Useful for undo/branching. | |
| email_id | Yes | ID of the email to refine (returned by generate_email) | |
| feedback | Yes | Natural language feedback describing what to change (e.g., "Make the headline bigger", "Change the button color to red") |