Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

get_folder

Retrieve details for a specific Mailchimp folder by providing its folder ID to access email marketing data.

Instructions

Get details of a specific folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folder_idYesThe folder ID

Implementation Reference

  • The handler logic within handleToolCall for the "get_folder" tool. It calls the MailchimpService.getFolder method with the provided folder_id and returns the folder details as a JSON-formatted text response.
    case "get_folder":
      const folder = await service.getFolder(args.folder_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(folder, null, 2),
          },
        ],
      };
  • Registration of the "get_folder" tool in the getToolDefinitions function, including name, description, and input schema.
    {
      name: "get_folder",
      description: "Get details of a specific folder",
      inputSchema: {
        type: "object",
        properties: {
          folder_id: {
            type: "string",
            description: "The folder ID",
          },
        },
        required: ["folder_id"],
      },
    },
  • Input schema definition for the "get_folder" tool, specifying folder_id as a required string parameter.
    inputSchema: {
      type: "object",
      properties: {
        folder_id: {
          type: "string",
          description: "The folder ID",
        },
      },
      required: ["folder_id"],
    },
  • The MailchimpService helper method that performs the actual API call to retrieve folder details using the Mailchimp API endpoint /campaign-folders/{folderId}.
    async getFolder(folderId: string): Promise<MailchimpFolder> {
      return await this.makeRequest(`/campaign-folders/${folderId}`);
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AgentX-ai/mailchimp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server