Skip to main content
Glama

set_campaign_content

Set or update content for Mailchimp email campaigns using custom HTML, plain text, or predefined templates to deliver marketing messages.

Instructions

Set campaign content. Provide html for custom content, or template_id to use a template.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes
htmlNo
plain_textNo
template_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The set_campaign_content tool definition and implementation, registered with the FastMCP decorator. It takes a campaign_id and either HTML/plain text content or a template_id to update the campaign's content via a PUT request to the Mailchimp API.
    async def set_campaign_content(
        campaign_id: str,
        html: str = "",
        plain_text: str = "",
        template_id: int = 0,
    ) -> str:
        """Set campaign content. Provide html for custom content, or template_id to use a template."""
        mc = get_client()
        body: dict[str, Any] = {}
        if html:
            body["html"] = html
        if plain_text:
            body["plain_text"] = plain_text
        if template_id:
            body["template"] = {"id": template_id}
        if not body:
            return "Provide html, plain_text, or template_id."
        await mc.put(f"/campaigns/{campaign_id}/content", json=body)
        return _fmt({
            "campaign_id": campaign_id,
            "content_type": "template" if template_id else "custom_html",
            "message": "Campaign content set.",
        })
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Set campaign content' which implies a write/mutation operation, but doesn't disclose behavioral traits like required permissions, whether it overwrites existing content, error conditions, or rate limits. The description adds minimal context beyond the basic action, leaving significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two clear sentences that directly address the tool's function and parameter options. Every word earns its place with zero redundancy. It's front-loaded with the core purpose followed by implementation details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with 4 parameters, 0% schema coverage, no annotations, but with an output schema, the description is minimally adequate. It covers the basic purpose and two parameters but lacks behavioral context, full parameter explanations, and guidance on alternatives. The output schema reduces need to describe returns, but significant gaps remain for safe and correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so parameters are undocumented in the schema. The description mentions 'html' and 'template_id' parameters, providing some semantic meaning for 2 of the 4 parameters. However, it doesn't explain 'campaign_id' (required) or 'plain_text', nor does it clarify relationships between parameters (e.g., mutual exclusivity). It adds value but doesn't fully compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Set' and resource 'campaign content', specifying it's for configuring content in campaigns. It distinguishes from siblings like 'get_campaign_content' (read vs. write) and 'create_campaign' (creation vs. content update), though it doesn't explicitly name alternatives. Purpose is specific but could better differentiate from similar tools like 'update_campaign'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning two content options (custom HTML or template), suggesting when to use each approach. However, it lacks explicit guidance on when to choose this tool over alternatives like 'update_campaign' or 'replicate_campaign', and doesn't mention prerequisites or exclusions. Usage context is implied but not clearly defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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