{
  "openapi": "3.1.0",
  "info": {
    "title": "Mailchimp MCP Server",
    "description": "Mailchimp Marketing API v3.0 for audience and campaign data",
    "version": "1.0.0",
    "contact": {
      "name": "Hopkin",
      "url": "https://hopkin.ai"
    }
  },
  "servers": [
    {
      "url": "https://mailchimp.mcp.hopkin.ai",
      "description": "Production MCP endpoint"
    }
  ],
  "paths": {
    "/tools": {
      "get": {
        "operationId": "listTools",
        "summary": "List available tools",
        "description": "Returns all tools registered on this server with their names, descriptions, and input schemas.",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "Tool list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_accounts": {
      "post": {
        "operationId": "mailchimp_list_accounts",
        "summary": "List Connected Mailchimp Accounts",
        "description": "List all Mailchimp accounts connected for the authenticated user. Returns account IDs, names, data centers, and login emails.",
        "tags": [
          "-accounts"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-accounts": {
                  "summary": "List accounts",
                  "value": {
                    "reason": "User asked which Mailchimp accounts are connected"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_audiences": {
      "post": {
        "operationId": "mailchimp_list_audiences",
        "summary": "List Mailchimp Audiences",
        "description": "List all audiences (lists) in the Mailchimp account with name search and pagination. Returns member count, open rate, click rate, and list rating for each audience.",
        "tags": [
          "-audiences"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "audience_id": {
                    "type": "string",
                    "description": "The Mailchimp audience (list) ID."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all": {
                  "summary": "List all",
                  "value": {
                    "reason": "List all audiences"
                  }
                },
                "search": {
                  "summary": "Search",
                  "value": {
                    "search": "Newsletter",
                    "reason": "Find newsletter audiences"
                  }
                },
                "force-refresh": {
                  "summary": "Force refresh",
                  "value": {
                    "refresh": true,
                    "reason": "Get fresh audience data"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_audience": {
      "post": {
        "operationId": "mailchimp_get_audience",
        "summary": "Get Mailchimp Audience Details",
        "description": "Get detailed information about a specific Mailchimp audience (list), including stats, settings, and campaign defaults.",
        "tags": [
          "audience"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "audience_id": {
                    "type": "string",
                    "description": "The Mailchimp audience (list) ID."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "get-by-id": {
                  "summary": "Get by ID",
                  "value": {
                    "audience_id": "abc123def",
                    "reason": "Get audience details"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_check_auth_status": {
      "post": {
        "operationId": "mailchimp_check_auth_status",
        "summary": "Check Mailchimp Authentication Status",
        "description": "Troubleshoot authentication issues and get user profile info. Only use when another tool fails with a permission or authentication error — do NOT call proactively.",
        "tags": [
          "k-auth-status"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "check-auth": {
                  "summary": "Check auth",
                  "value": {
                    "reason": "Another tool returned an auth error, checking Mailchimp account connection status"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_automations": {
      "post": {
        "operationId": "mailchimp_list_automations",
        "summary": "List Mailchimp Automations",
        "description": "List automations (classic automations / customer journeys) in the Mailchimp account with status filtering, title search, and pagination.",
        "tags": [
          "-automations"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "automation_id": {
                    "type": "string",
                    "description": "The Mailchimp automation (classic automation / customer journey) ID."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "automation_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all": {
                  "summary": "List all",
                  "value": {
                    "reason": "List all automations"
                  }
                },
                "filter-by-status": {
                  "summary": "Filter by status",
                  "value": {
                    "status": [
                      "sending"
                    ],
                    "reason": "List active automations"
                  }
                },
                "search": {
                  "summary": "Search",
                  "value": {
                    "search": "Welcome",
                    "reason": "Find welcome automations"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_automation": {
      "post": {
        "operationId": "mailchimp_get_automation",
        "summary": "Get Mailchimp Automation Details",
        "description": "Get detailed information about a specific Mailchimp automation including all associated emails with their delivery stats.",
        "tags": [
          "automation"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "automation_id": {
                    "type": "string",
                    "description": "The Mailchimp automation (classic automation / customer journey) ID."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "automation_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "get-by-id": {
                  "summary": "Get by ID",
                  "value": {
                    "automation_id": "abc123",
                    "reason": "Get automation details with emails"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_campaigns": {
      "post": {
        "operationId": "mailchimp_list_campaigns",
        "summary": "List Mailchimp Campaigns",
        "description": "List campaigns in the Mailchimp account with status filtering, server-side title search, sorting, date range filtering, and pagination. When the search parameter is provided (without a cursor), routes to Mailchimp's /search-campaigns endpoint for accurate server-side matching sorted by most recent send_time — ideal for campaign disambiguation by title. Results include web_id, audience name, and send_time for easy identification. Use sort_field=send_time with sort_dir=DESC to get the most recently sent campaigns first. Use since_send_time/before_send_time to filter by send date window.",
        "tags": [
          "-campaigns"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "campaign_id": {
                    "type": "string",
                    "description": "The Mailchimp campaign ID. Required unless web_id is provided."
                  },
                  "web_id": {
                    "type": "integer",
                    "description": "Alternative to campaign_id: the numeric web_id from Mailchimp UI URLs. If both are provided, campaign_id takes precedence."
                  },
                  "include_content": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include a preview of the campaign HTML/text content (truncated to 5000 chars)."
                  },
                  "include_send_checklist": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include the send checklist for the campaign."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all": {
                  "summary": "List all",
                  "value": {
                    "reason": "List all campaigns"
                  }
                },
                "filter-by-status": {
                  "summary": "Filter by status",
                  "value": {
                    "status": [
                      "sent",
                      "sending"
                    ],
                    "reason": "List sent campaigns"
                  }
                },
                "search": {
                  "summary": "Search",
                  "value": {
                    "search": "Welcome",
                    "reason": "Find welcome campaigns"
                  }
                },
                "latest-sent": {
                  "summary": "Latest sent",
                  "value": {
                    "status": [
                      "sent"
                    ],
                    "sort_field": "send_time",
                    "sort_dir": "DESC",
                    "limit": 10,
                    "reason": "Get 10 most recently sent campaigns"
                  }
                },
                "recent-window": {
                  "summary": "Recent window",
                  "value": {
                    "status": [
                      "sent"
                    ],
                    "sort_field": "send_time",
                    "sort_dir": "DESC",
                    "since_send_time": "2025-04-01T00:00:00Z",
                    "reason": "Campaigns sent since April 2025"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_campaign": {
      "post": {
        "operationId": "mailchimp_get_campaign",
        "summary": "Get Mailchimp Campaign Details",
        "description": "Get detailed information about a specific Mailchimp campaign. Optionally includes content preview (text/HTML, truncated) and send checklist.",
        "tags": [
          "campaign"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "campaign_id": {
                    "type": "string",
                    "description": "The Mailchimp campaign ID. Required unless web_id is provided."
                  },
                  "web_id": {
                    "type": "integer",
                    "description": "Alternative to campaign_id: the numeric web_id from Mailchimp UI URLs. If both are provided, campaign_id takes precedence."
                  },
                  "include_content": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include a preview of the campaign HTML/text content (truncated to 5000 chars)."
                  },
                  "include_send_checklist": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include the send checklist for the campaign."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "get-by-id": {
                  "summary": "Get by ID",
                  "value": {
                    "campaign_id": "abc123",
                    "reason": "Get campaign details"
                  }
                },
                "with-content": {
                  "summary": "With content",
                  "value": {
                    "campaign_id": "abc123",
                    "include_content": true,
                    "reason": "Get campaign with content preview"
                  }
                },
                "with-checklist": {
                  "summary": "With checklist",
                  "value": {
                    "campaign_id": "abc123",
                    "include_send_checklist": true,
                    "reason": "Check campaign readiness"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_connections": {
      "post": {
        "operationId": "mailchimp_list_connections",
        "summary": "List Mailchimp Connections",
        "description": "List the Mailchimp connections available to you — both ones you own and ones shared with you via an organization. Use this to discover connection IDs for set_default / share / rename / revoke.",
        "tags": [
          "-connections"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-connections": {
                  "summary": "List connections",
                  "value": {
                    "reason": "User asked which Mailchimp accounts they have connected"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_set_default_connection": {
      "post": {
        "operationId": "mailchimp_set_default_connection",
        "summary": "Set Default Mailchimp Connection",
        "description": "Set the Mailchimp connection that should be used by default for subsequent Mailchimp tool calls. The default is scoped to the calling actor (your user account, or the API key being used).",
        "tags": [
          "default-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the connection to mark as the actor's default Mailchimp connection."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "connection_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "set-default": {
                  "summary": "Set default",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User picked their primary Mailchimp workspace"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_share_connection": {
      "post": {
        "operationId": "mailchimp_share_connection",
        "summary": "Share Mailchimp Connection With Organization",
        "description": "Share an owned Mailchimp connection with all members of your organization, so teammates can use it without having to reconnect Mailchimp themselves. You must be the owner of the connection.",
        "tags": [
          "e-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "share-with-org": {
                  "summary": "Share with org",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User asked to share this Mailchimp connection with their teammates"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_unshare_connection": {
      "post": {
        "operationId": "mailchimp_unshare_connection",
        "summary": "Unshare Mailchimp Connection From Organization",
        "description": "Stop sharing an owned Mailchimp connection with your organization. Teammates lose access immediately. You must be the owner.",
        "tags": [
          "are-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "stop-sharing": {
                  "summary": "Stop sharing",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User no longer wants the team to access this Mailchimp connection"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_rename_connection": {
      "post": {
        "operationId": "mailchimp_rename_connection",
        "summary": "Rename Mailchimp Connection",
        "description": "Rename the display name of an owned Mailchimp connection. The OAuth grant and underlying account are unaffected — this only changes the human-readable label. You must be the owner.",
        "tags": [
          "me-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "rename": {
                  "summary": "Rename",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "display_name": "Acme — Production",
                    "reason": "User wanted a clearer label for this Mailchimp connection"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_revoke_connection": {
      "post": {
        "operationId": "mailchimp_revoke_connection",
        "summary": "Revoke Mailchimp Connection",
        "description": "Revoke (soft-delete) an owned Mailchimp connection. Any defaults pointing to it are invalidated and shared org members lose access. The OAuth grant at Mailchimp is NOT revoked by this tool — the user must disconnect via the dashboard if they want to fully revoke at Mailchimp. You must be the owner.",
        "tags": [
          "ke-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "revoke": {
                  "summary": "Revoke",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User asked to disconnect this Mailchimp account"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_ping": {
      "post": {
        "operationId": "mailchimp_ping",
        "summary": "Ping Mailchimp MCP Server",
        "description": "Health check for the Mailchimp MCP server. Does not call the Mailchimp API.",
        "tags": [
          ""
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feedback_type": {
                    "type": "string",
                    "enum": [
                      "new_tool",
                      "improvement",
                      "bug",
                      "workflow_gap"
                    ],
                    "description": "Feedback category: new_tool (request new capability), improvement (enhance existing tool), bug (report issue), workflow_gap (missing workflow)"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 200,
                    "description": "Concise title summarizing the feedback"
                  },
                  "description": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 2000,
                    "description": "What is needed and why"
                  },
                  "current_workaround": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Current workaround, if any"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "default": "medium",
                    "description": "Impact level: low (nice-to-have), medium (improves workflow), high (blocking issue)"
                  },
                  "interface": {
                    "type": "string",
                    "enum": [
                      "MCP",
                      "CLI"
                    ],
                    "default": "MCP",
                    "description": "Interface the feedback originated from: MCP (default) or CLI"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "feedback_type",
                  "title",
                  "description",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "health-check": {
                  "summary": "Health check",
                  "value": {
                    "reason": "Verify server is running"
                  }
                },
                "with-message": {
                  "summary": "With message",
                  "value": {
                    "message": "hello",
                    "reason": "Test connectivity"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_campaign_report": {
      "post": {
        "operationId": "mailchimp_get_campaign_report",
        "summary": "Get Mailchimp Campaign Report",
        "description": "Get a detailed performance report for a sent Mailchimp campaign, including opens, clicks, bounces, forwards, ecommerce, delivery status, and industry comparison stats.",
        "tags": [
          "campaign-report"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "audience_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The Mailchimp audience/list ID."
                  },
                  "include_growth_history": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_activity": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_clients": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_locations": {
                    "type": "boolean",
                    "default": true
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "get-report": {
                  "summary": "Get report",
                  "value": {
                    "campaign_id": "abc123",
                    "reason": "Get campaign performance report"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_audience_insights": {
      "post": {
        "operationId": "mailchimp_get_audience_insights",
        "summary": "Get Mailchimp Audience Insights",
        "description": "Get insights for a Mailchimp audience including growth history, activity, email clients, and geographic locations. Each data source is fetched in parallel and degrades gracefully on failure.",
        "tags": [
          "audience-insights"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "audience_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The Mailchimp audience/list ID."
                  },
                  "include_growth_history": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_activity": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_clients": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_locations": {
                    "type": "boolean",
                    "default": true
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "full-insights": {
                  "summary": "Full insights",
                  "value": {
                    "audience_id": "abc123",
                    "reason": "Get audience insights"
                  }
                },
                "growth-only": {
                  "summary": "Growth only",
                  "value": {
                    "audience_id": "abc123",
                    "include_activity": false,
                    "include_clients": false,
                    "include_locations": false,
                    "reason": "Get growth history only"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_email_activity": {
      "post": {
        "operationId": "mailchimp_get_email_activity",
        "summary": "Get Mailchimp Email Activity",
        "description": "Get email activity (opens, clicks, bounces) for individual recipients of a sent Mailchimp campaign. Supports pagination.",
        "tags": [
          "email-activity"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "audience_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The Mailchimp audience/list ID."
                  },
                  "include_growth_history": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_activity": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_clients": {
                    "type": "boolean",
                    "default": true
                  },
                  "include_locations": {
                    "type": "boolean",
                    "default": true
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "get-activity": {
                  "summary": "Get activity",
                  "value": {
                    "campaign_id": "abc123",
                    "reason": "Get email activity for campaign"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_ab_test_report": {
      "post": {
        "operationId": "mailchimp_get_ab_test_report",
        "summary": "Get Mailchimp A/B Test or Multivariate Report",
        "description": "Get per-variant performance data for an A/B split or multivariate campaign test. Returns variant-level metrics including opens, clicks, bounces, ecommerce, and winner status. Each variant includes a test_type field (subject_line, from_name, content, send_time, multivariate, unknown) and a changed_dimensions object with structured variant definition data (subject_line, from_name, reply_to, content_label, send_time_variant). Ecommerce data includes currency and an ecommerce_data_complete flag indicating whether all variants have data. Works for both A/B split (2 variants) and multivariate (multiple combinations) campaigns. Use mailchimp_list_campaigns with type filter [\"absplit\", \"variate\"] to find testable campaigns.",
        "tags": [
          "ab-test-report"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "campaign_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The Mailchimp campaign ID. Must be an A/B split or multivariate campaign."
                  },
                  "include_ecommerce": {
                    "type": "boolean",
                    "default": true,
                    "description": "Include per-variant ecommerce data (orders, revenue). Only available if ecommerce tracking is enabled."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "campaign_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "get-a-b-test-report": {
                  "summary": "Get A/B test report",
                  "value": {
                    "campaign_id": "abc123",
                    "reason": "Get variant-level A/B test results"
                  }
                },
                "without-ecommerce": {
                  "summary": "Without ecommerce",
                  "value": {
                    "campaign_id": "abc123",
                    "include_ecommerce": false,
                    "reason": "Get A/B test results without ecommerce data"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_segments": {
      "post": {
        "operationId": "mailchimp_list_segments",
        "summary": "List Mailchimp Segments",
        "description": "List segments for a Mailchimp audience with optional type filtering and pagination. Segment types include saved, static, and fuzzy.",
        "tags": [
          "-segments"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "audience_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The Mailchimp audience/list ID."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "saved",
                      "static",
                      "fuzzy"
                    ],
                    "description": "Filter by segment type."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20
                  },
                  "cursor": {
                    "type": "string"
                  },
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all": {
                  "summary": "List all",
                  "value": {
                    "audience_id": "abc123",
                    "reason": "List audience segments"
                  }
                },
                "filter-by-type": {
                  "summary": "Filter by type",
                  "value": {
                    "audience_id": "abc123",
                    "type": "saved",
                    "reason": "List saved segments"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_subscribers": {
      "post": {
        "operationId": "mailchimp_list_subscribers",
        "summary": "List Mailchimp Subscribers",
        "description": "List subscribers (members) of a Mailchimp audience with status filtering, email search, and pagination. Requires an audience_id. Use search to find specific subscribers by email or name.",
        "tags": [
          "-subscribers"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "audience_id": {
                    "type": "string",
                    "description": "The Mailchimp audience (list) ID."
                  },
                  "email_or_hash": {
                    "type": "string",
                    "description": "Email address or MD5 subscriber hash."
                  },
                  "include_activity": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include recent activity feed for this subscriber."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "email_or_hash",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all": {
                  "summary": "List all",
                  "value": {
                    "audience_id": "abc123",
                    "reason": "List subscribers"
                  }
                },
                "filter-by-status": {
                  "summary": "Filter by status",
                  "value": {
                    "audience_id": "abc123",
                    "status": [
                      "subscribed"
                    ],
                    "reason": "List active subscribers"
                  }
                },
                "search": {
                  "summary": "Search",
                  "value": {
                    "audience_id": "abc123",
                    "search": "john@example.com",
                    "reason": "Find a subscriber"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_get_subscriber": {
      "post": {
        "operationId": "mailchimp_get_subscriber",
        "summary": "Get Mailchimp Subscriber Details",
        "description": "Get detailed information about a specific subscriber by email address or MD5 hash. Optionally includes recent activity feed.",
        "tags": [
          "subscriber"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "audience_id": {
                    "type": "string",
                    "description": "The Mailchimp audience (list) ID."
                  },
                  "email_or_hash": {
                    "type": "string",
                    "description": "Email address or MD5 subscriber hash."
                  },
                  "include_activity": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include recent activity feed for this subscriber."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "email_or_hash",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "get-by-email": {
                  "summary": "Get by email",
                  "value": {
                    "audience_id": "abc123",
                    "email_or_hash": "john@example.com",
                    "reason": "Get subscriber details"
                  }
                },
                "with-activity": {
                  "summary": "With activity",
                  "value": {
                    "audience_id": "abc123",
                    "email_or_hash": "john@example.com",
                    "include_activity": true,
                    "reason": "Get subscriber with activity"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_tags": {
      "post": {
        "operationId": "mailchimp_list_tags",
        "summary": "List Mailchimp Tags",
        "description": "List tags for a Mailchimp audience with pagination. Tags are user-defined labels applied to subscribers for organization and segmentation.",
        "tags": [
          "-tags"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "audience_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The Mailchimp audience/list ID."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20
                  },
                  "cursor": {
                    "type": "string"
                  },
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "audience_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all": {
                  "summary": "List all",
                  "value": {
                    "audience_id": "abc123",
                    "reason": "List audience tags"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/mailchimp_list_templates": {
      "post": {
        "operationId": "mailchimp_list_templates",
        "summary": "List Mailchimp Templates",
        "description": "List email templates in the Mailchimp account with type filtering, name search, and pagination. Filter by type (user, base, gallery) to narrow results.",
        "tags": [
          "-templates"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20,
                    "description": "Maximum number of results to return (1–100). Default: 20."
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Opaque pagination cursor from a previous response."
                  },
                  "refresh": {
                    "type": "boolean",
                    "default": false,
                    "description": "Force a fresh fetch bypassing the cache."
                  },
                  "account_id": {
                    "type": "string",
                    "description": "Mailchimp account ID. Required when multiple accounts are connected. Use mailchimp_list_accounts to see available accounts."
                  },
                  "search": {
                    "type": "string",
                    "description": "Filter templates by name (case-insensitive substring match)."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "user",
                      "base",
                      "gallery"
                    ],
                    "description": "Filter templates by type."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all": {
                  "summary": "List all",
                  "value": {
                    "reason": "List all templates"
                  }
                },
                "filter-by-type": {
                  "summary": "Filter by type",
                  "value": {
                    "type": "user",
                    "reason": "List user-created templates"
                  }
                },
                "search": {
                  "summary": "Search",
                  "value": {
                    "search": "Newsletter",
                    "reason": "Find newsletter templates"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Supabase JWT or hpk_live_... API key"
      }
    },
    "schemas": {
      "McpToolResult": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "resource_link"
                  ]
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "structuredContent": {
            "type": "object",
            "additionalProperties": true
          },
          "isError": {
            "type": "boolean"
          }
        }
      },
      "McpError": {
        "type": "object",
        "properties": {
          "isError": {
            "type": "boolean",
            "const": true
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "text"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "RestError": {
        "type": "object",
        "description": "Error response from REST tool endpoints (mapped from JSON-RPC error codes)",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable error message"
          },
          "code": {
            "type": "integer",
            "description": "JSON-RPC error code"
          },
          "data": {
            "description": "Additional error context"
          }
        },
        "required": [
          "error",
          "code"
        ]
      },
      "ToolList": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inputSchema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "discovery",
      "description": "Tool discovery and introspection"
    },
    {
      "name": "",
      "description": " tools"
    },
    {
      "name": "-accounts",
      "description": "-accounts tools"
    },
    {
      "name": "-audiences",
      "description": "-audiences tools"
    },
    {
      "name": "-automations",
      "description": "-automations tools"
    },
    {
      "name": "-campaigns",
      "description": "-campaigns tools"
    },
    {
      "name": "-connections",
      "description": "-connections tools"
    },
    {
      "name": "-segments",
      "description": "-segments tools"
    },
    {
      "name": "-subscribers",
      "description": "-subscribers tools"
    },
    {
      "name": "-tags",
      "description": "-tags tools"
    },
    {
      "name": "-templates",
      "description": "-templates tools"
    },
    {
      "name": "ab-test-report",
      "description": "Ab-test-report tools"
    },
    {
      "name": "are-connection",
      "description": "Are-connection tools"
    },
    {
      "name": "audience",
      "description": "Audience tools"
    },
    {
      "name": "audience-insights",
      "description": "Audience-insights tools"
    },
    {
      "name": "automation",
      "description": "Automation tools"
    },
    {
      "name": "campaign",
      "description": "Campaign tools"
    },
    {
      "name": "campaign-report",
      "description": "Campaign-report tools"
    },
    {
      "name": "default-connection",
      "description": "Default-connection tools"
    },
    {
      "name": "e-connection",
      "description": "E-connection tools"
    },
    {
      "name": "email-activity",
      "description": "Email-activity tools"
    },
    {
      "name": "k-auth-status",
      "description": "K-auth-status tools"
    },
    {
      "name": "ke-connection",
      "description": "Ke-connection tools"
    },
    {
      "name": "me-connection",
      "description": "Me-connection tools"
    },
    {
      "name": "subscriber",
      "description": "Subscriber tools"
    }
  ]
}