Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_folders

Retrieve all campaign folders from Mailchimp to organize and manage email marketing content effectively.

Instructions

List all campaign folders

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'list_folders' tool within the handleToolCall switch statement. It calls the MailchimpService.listFolders() method, maps the results to include only id, name, and count, and returns the data as a formatted JSON text response.
    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
            ),
          },
        ],
      };
  • The tool registration object defining the 'list_folders' tool, including its name, description, and input schema (which requires no parameters). This array is used by getToolDefinitions to expose the tool via MCP.
    {
      name: "list_folders",
      description: "List all campaign folders",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • TypeScript interface defining the structure of a Mailchimp folder object, used in the return type of listFolders() and mapped in the handler.
    export interface MailchimpFolder {
      id: string;
      name: string;
      count: number;
      _links?: Array<{
        rel: string;
        href: string;
        method: string;
        targetSchema?: string;
        schema?: string;
      }>;
    }
  • Helper method in MailchimpService that performs the actual API call to fetch campaign folders using makePaginatedRequest, invoked by the tool handler.
    async listFolders(): Promise<{ folders: MailchimpFolder[] }> {
      return await this.makePaginatedRequest("/campaign-folders", "name", "ASC");
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it's a list operation but doesn't mention whether it's paginated, sorted, filtered, or if it requires authentication. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a simple list operation with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema) and lack of annotations, the description is minimal but incomplete. It doesn't address what 'all' means (e.g., pagination limits), the format of returned data, or how it differs from similar tools like 'get_folder', leaving the agent with insufficient context for optimal use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description adds no parameter information, but since there are no parameters to document, this meets expectations. A perfect score would require the description to explicitly note the lack of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List all campaign folders' clearly states the verb ('List') and resource ('campaign folders'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_folder' or other list tools, which would require more specificity for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_folder' or other list tools. It lacks context about prerequisites, limitations, or typical use cases, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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