fluentcrm_attach_contact_to_list
Assign a contact to specific mailing lists in FluentCRM to organize subscribers and target communications effectively.
Instructions
Przypisuje kontakt do listy
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subscriberId | Yes | ID kontaktu | |
| listIds | Yes | Lista ID list |
Implementation Reference
- src/fluentcrm-mcp-server.ts:175-181 (handler)Core handler function in FluentCRMClient that attaches a contact (subscriber) to specified lists by making a POST request to the FluentCRM REST API endpoint `/subscribers/{subscriberId}/lists`.async attachContactToList(subscriberId: number, listIds: number[]) { const response = await this.apiClient.post( `/subscribers/${subscriberId}/lists`, { lists: listIds } ); return response.data; }
- src/fluentcrm-mcp-server.ts:659-670 (registration)Tool registration in the MCP server's tools list, including the tool name, description, and input schema validation for subscriberId and listIds parameters.{ name: 'fluentcrm_attach_contact_to_list', description: 'Przypisuje kontakt do listy', inputSchema: { type: 'object', properties: { subscriberId: { type: 'number', description: 'ID kontaktu' }, listIds: { type: 'array', items: { type: 'number' }, description: 'Lista ID list' }, }, required: ['subscriberId', 'listIds'], }, },
- src/fluentcrm-mcp-server.ts:973-974 (handler)MCP server request handler switch case that processes the tool call by extracting arguments and invoking the FluentCRMClient's attachContactToList method, returning JSON-formatted response.case 'fluentcrm_attach_contact_to_list': return { content: [{ type: 'text', text: JSON.stringify(await client.attachContactToList((args as any)?.subscriberId, (args as any)?.listIds), null, 2) }] };