Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_files

Retrieve all files stored in Mailchimp's File Manager to access uploaded images, documents, and media for email campaigns.

Instructions

List all files in the File Manager

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_files' tool. It invokes the service.listFiles() method and formats the list of files into a JSON string response for the MCP tool call.
    case "list_files":
      const files = await service.listFiles();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              files.files.map((f) => ({
                id: f.id,
                name: f.name,
                size: f.size,
                created_at: f.created_at,
              })),
              null,
              2
            ),
          },
        ],
      };
  • The tool schema definition, specifying the name, description, and input schema (no required parameters). This is part of the tool registrations returned by getToolDefinitions.
    {
      name: "list_files",
      description: "List all files in the File Manager",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Helper method in MailchimpService that performs a paginated GET request to the Mailchimp File Manager API endpoint to retrieve the list of files.
    async listFiles(): Promise<{ files: MailchimpFile[] }> {
      return await this.makePaginatedRequest(
        "/file-manager/files",
        "created_at",
        "DESC"
      );
    }
  • TypeScript interface defining the structure of file objects returned by the Mailchimp File Manager API, used for type safety in the service layer.
    export interface MailchimpFile {
      id: string;
      folder_id: string;
      name: string;
      file_data: string;
      type: string;
      size: number;
      created_at: string;
      created_by: string;
      _links?: Array<{
        rel: string;
        href: string;
        method: string;
        targetSchema?: string;
        schema?: string;
      }>;
    }
  • src/index.ts:42-46 (registration)
    MCP server registration for listing tools. Returns all tool definitions (including list_files) via getToolDefinitions when ListTools is called.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: getToolDefinitions(mailchimpService),
      };
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't mention critical details like whether this is a read-only operation, if it requires authentication, what the output format looks like (e.g., pagination, filtering options), or any rate limits. This leaves significant gaps for an agent to understand how to interact with it effectively.

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 no wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

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 lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects (e.g., read-only vs. destructive, authentication needs) or output details, which are crucial for a list operation that might return complex data. For a tool with no structured metadata, more context is needed.

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 zero parameters, and the input schema coverage is 100%, so there's no need for parameter explanation in the description. The description appropriately focuses on the tool's purpose rather than redundant parameter details, earning a baseline high score for this dimension.

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 clearly states the verb ('List') and resource ('all files in the File Manager'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'get_file' (which likely retrieves a specific file), missing an opportunity for full differentiation.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_file' (for individual files) or other list_* siblings. The description simply states what it does without context about use cases or prerequisites.

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