Skip to main content
Glama

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
NameRequiredDescriptionDefault
template_idYes

Implementation Reference

  • 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", ""),
        })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AlexlaGuardia/mcp-mailchimp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server