get_merge_field
Retrieve specific merge field details from a Mailchimp list using list ID and merge field ID for email marketing data management.
Instructions
Get details of a specific merge field
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes | The list ID | |
| merge_field_id | Yes | The merge field ID |
Implementation Reference
- src/services/mailchimp.ts:371-378 (handler)Core handler function in MailchimpService that executes the API call to retrieve a specific merge field by list ID and merge field ID.async getMergeField( listId: string, mergeFieldId: number ): Promise<MailchimpMergeField> { return await this.makeRequest( `/lists/${listId}/merge-fields/${mergeFieldId}` ); }
- src/tools/index.ts:960-972 (handler)Tool dispatch handler in handleToolCall that calls the service method and returns formatted JSON response.case "get_merge_field": const mergeField = await service.getMergeField( args.list_id, args.merge_field_id ); return { content: [ { type: "text", text: JSON.stringify(mergeField, null, 2), }, ], };
- src/tools/index.ts:361-377 (registration)Tool registration including name, description, and input schema definition in getToolDefinitions.name: "get_merge_field", description: "Get details of a specific merge field", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, merge_field_id: { type: "number", description: "The merge field ID", }, }, required: ["list_id", "merge_field_id"], }, },
- src/tools/index.ts:361-377 (schema)Input schema for the get_merge_field tool.name: "get_merge_field", description: "Get details of a specific merge field", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, merge_field_id: { type: "number", description: "The merge field ID", }, }, required: ["list_id", "merge_field_id"], }, },