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
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | The file ID |
Implementation Reference
- src/tools/index.ts:995-1004 (handler)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), }, ], };
- src/tools/index.ts:388-401 (registration)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"], }, },
- src/types/index.ts:705-721 (schema)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; }>; }
- src/services/mailchimp.ts:278-280 (helper)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}`); }