get_template
Retrieve template details and HTML content from Mailchimp for email campaign management and content reuse.
Instructions
Get a template's details and HTML content.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes |
Implementation Reference
- mcp_mailchimp/server.py:749-762 (handler)The implementation of the get_template tool, which retrieves template details and HTML content via the Mailchimp client.
@mcp.tool() async def get_template(template_id: int) -> str: """Get a template's details and HTML content.""" mc = get_client() t = await mc.get(f"/templates/{template_id}") return _fmt({ "id": t.get("id", ""), "name": t.get("name", ""), "type": t.get("type", ""), "active": t.get("active", False), "html": t.get("html", "")[:5000], "created_at": t.get("date_created", ""), "edited_at": t.get("date_edited", ""), })