Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

get_file

Retrieve specific file details from your Mailchimp account using the file ID to access email marketing assets and content.

Instructions

Get details of a specific file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesThe file ID

Implementation Reference

  • Handler for the 'get_file' tool: retrieves the file using MailchimpService and returns a JSON-formatted text response.
    case "get_file":
      const file = await service.getFile(args.file_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(file, null, 2),
          },
        ],
      };
  • Tool registration definition for 'get_file', including name, description, and input schema.
    {
      name: "get_file",
      description: "Get details of a specific file",
      inputSchema: {
        type: "object",
        properties: {
          file_id: {
            type: "string",
            description: "The file ID",
          },
        },
        required: ["file_id"],
      },
    },
  • TypeScript interface defining the structure of the MailchimpFile response object used as output schema for the get_file tool.
    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;
      }>;
    }
  • Service helper method that performs the actual API call to retrieve file details from Mailchimp's File Manager.
    async getFile(fileId: string): Promise<MailchimpFile> {
      return await this.makeRequest(`/file-manager/files/${fileId}`);
    }

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