list_landing_pages
Retrieve all landing pages from your Mailchimp account to manage and analyze your email marketing campaigns.
Instructions
List all landing pages
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:1007-1025 (handler)Executes the tool by calling the Mailchimp service's listLandingPages method and formatting the landing pages list into a JSON string response.case "list_landing_pages": const landingPages = await service.listLandingPages(); return { content: [ { type: "text", text: JSON.stringify( landingPages.landing_pages.map((lp) => ({ id: lp.id, name: lp.name, type: lp.type, created_at: lp.created_at, })), null, 2 ), }, ], };
- src/tools/index.ts:404-411 (schema)Tool schema definition with name, description, and empty input schema (no parameters required).name: "list_landing_pages", description: "List all landing pages", inputSchema: { type: "object", properties: {}, required: [], }, },
- src/index.ts:42-46 (registration)Registers the tool list (including list_landing_pages) with the MCP server via getToolDefinitions.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: getToolDefinitions(mailchimpService), }; });
- src/services/mailchimp.ts:283-289 (helper)Service helper method that makes a paginated API request to Mailchimp's /landing-pages endpoint to fetch the list of landing pages.async listLandingPages(): Promise<{ landing_pages: MailchimpLandingPage[] }> { return await this.makePaginatedRequest( "/landing-pages", "created_at", "DESC" ); }