Skip to main content
Glama

update_campaign

Update a Mailchimp campaign's settings by providing only the fields you want to modify, including subject line, from name, reply to, title, and preview text.

Instructions

Update campaign settings. Only provide fields you want to change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes
subject_lineNo
from_nameNo
reply_toNo
titleNo
preview_textNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The update_campaign tool handler. Takes campaign_id plus optional fields (subject_line, from_name, reply_to, title, preview_text), builds a settings dict with only the provided non-empty fields, and sends a PATCH request to Mailchimp's /campaigns/{campaign_id} endpoint.
    @mcp.tool()
    async def update_campaign(
        campaign_id: str,
        subject_line: str = "",
        from_name: str = "",
        reply_to: str = "",
        title: str = "",
        preview_text: str = "",
    ) -> str:
        """Update campaign settings. Only provide fields you want to change."""
        mc = get_client()
        settings: dict[str, str] = {}
        if subject_line:
            settings["subject_line"] = subject_line
        if from_name:
            settings["from_name"] = from_name
        if reply_to:
            settings["reply_to"] = reply_to
        if title:
            settings["title"] = title
        if preview_text:
            settings["preview_text"] = preview_text
        if not settings:
            return "No fields provided to update."
        c = await mc.patch(f"/campaigns/{campaign_id}", json={"settings": settings})
        return _fmt({
            "id": c["id"],
            "status": c.get("status", ""),
            "updated_fields": list(settings.keys()),
            "message": "Campaign updated.",
        })
  • The tool is registered via the @mcp.tool() decorator on the async function update_campaign, using the FastMCP framework's decorator pattern.
    @mcp.tool()
    async def update_campaign(
  • The MailchimpClient.patch() helper method used by update_campaign to send the PATCH HTTP request to Mailchimp's API.
    async def patch(self, path: str, json: dict[str, Any]) -> Any:
Behavior2/5

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

No annotations are provided, so the description must carry the burden. It states the mutating nature and hints at partial updates, but does not disclose permissions, idempotency, error handling, or behavior for omitted fields (e.g., whether they remain unchanged or reset to defaults).

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 a single, front-loaded sentence with no superfluous words. Every word contributes to the core message.

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

Completeness2/5

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

Given the lack of annotations, low parameter documentation, and presence of an output schema (which might cover return values), the description is too sparse. It omits critical context such as required permissions, expected response format, and potential error conditions.

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

Parameters2/5

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

With 0% schema description coverage, the description adds only the generic note about partial updates but does not explain any specific parameter (e.g., subject_line, from_name). The field names are self-explanatory but the description offers no additional context beyond the schema labels.

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

Purpose5/5

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

The description clearly states the action 'Update campaign settings' and the resource 'campaign'. This distinguishes it from sibling tools like create_campaign and delete_campaign, which have different purposes.

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 instruction 'Only provide fields you want to change' implies a partial update pattern, but no explicit guidance on when to use this tool versus alternatives (e.g., create_campaign for new campaigns) or prerequisites like campaign existence.

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