Create Template
create-templateCreate an email template from HTML or Topol editor JSON, with merge tags extracted automatically. Set purpose as transactional or campaign at creation since it cannot be changed later.
Instructions
Create a new email template with HTML or Topol editor JSON content. Provide either html or json — they are mutually exclusive. Merge tags are automatically extracted from the content.
Set purpose deliberately. It defaults to transactional, and it cannot be changed after creation. A campaign can only send a template whose purpose is campaign, so a newsletter or promotion created with the default has to be recreated from scratch. If the user is writing anything that goes to an audience list, pass purpose: "campaign".
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": {
"name": "<name>"
},
"name": "create-template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | HTML content for the template. Mutually exclusive with json. Use {{VARIABLE}} syntax for merge tags. | |
| json | No | JSON content for Topol visual editor templates. Mutually exclusive with html. | |
| name | Yes | Name of the template (max 255 characters) | |
| purpose | No | What the template is for. **transactional** (default) is triggered by one user's action — a receipt, password reset, alert. **campaign** is marketing sent to an audience list, and is the ONLY kind a campaign can send. This cannot be changed later: a newsletter created as transactional must be recreated. | |
| folder_id | No | Folder ID within the project. If not provided, uses the first folder. Use list-folders to find one. | |
| project_id | No | Project ID to create the template in. If not provided, uses the team's default project. |