get_subscriber_activity
Retrieve subscriber activity data for automation emails in Mailchimp to monitor engagement and track email campaign performance.
Instructions
Get subscriber activity for an automation email
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workflow_id": "<workflow_id>",
"email_id": "<email_id>",
"subscriber_hash": "<subscriber_hash>"
},
"name": "get_subscriber_activity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | The workflow ID of the automation | |
| email_id | Yes | The email ID within the automation | |
| subscriber_hash | Yes | The subscriber hash |
Implementation Reference
- src/services/mailchimp.ts:178-186 (handler)The handler function that executes the core logic of fetching subscriber activity from the Mailchimp API endpoint using the private makeRequest method.
async getSubscriberActivity( workflowId: string, emailId: string, subscriberHash: string ): Promise<any> { return await this.makeRequest( `/automations/${workflowId}/emails/${emailId}/queue/${subscriberHash}/activity` ); } - src/tools/index.ts:151-172 (schema)The input schema definition for the tool, specifying the required parameters and their descriptions.
{ name: "get_subscriber_activity", description: "Get subscriber activity for an automation email", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, subscriber_hash: { type: "string", description: "The subscriber hash", }, }, required: ["workflow_id", "email_id", "subscriber_hash"], }, }, - src/tools/index.ts:707-720 (registration)The registration and dispatch logic in the handleToolCall switch statement that calls the service handler and formats the response.
case "get_subscriber_activity": const activity = await service.getSubscriberActivity( args.workflow_id, args.email_id, args.subscriber_hash ); return { content: [ { type: "text", text: JSON.stringify(activity, null, 2), }, ], };