list_folders
Retrieve all campaign folders from your Mailchimp account to organize and manage email marketing content.
Instructions
List all campaign folders
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:907-924 (handler)Handler for the 'list_folders' tool call. Delegates to MailchimpService.listFolders() and returns formatted JSON response containing folder IDs, names, and counts.case "list_folders": const folders = await service.listFolders(); return { content: [ { type: "text", text: JSON.stringify( folders.folders.map((f) => ({ id: f.id, name: f.name, count: f.count, })), null, 2 ), }, ], };
- src/tools/index.ts:325-329 (schema)Input schema for the 'list_folders' tool, which takes no parameters.inputSchema: { type: "object", properties: {}, required: [], },
- src/tools/index.ts:322-330 (registration)Tool registration/definition in getToolDefinitions array, including name, description, and input schema.{ name: "list_folders", description: "List all campaign folders", inputSchema: { type: "object", properties: {}, required: [], }, },
- src/services/mailchimp.ts:261-263 (helper)Core helper method in MailchimpService that fetches campaign folders from the Mailchimp API using paginated request to /campaign-folders endpoint.async listFolders(): Promise<{ folders: MailchimpFolder[] }> { return await this.makePaginatedRequest("/campaign-folders", "name", "ASC"); }