fluentcrm_attach_contact_to_list
Assign a contact to one or multiple marketing lists in FluentCRM using their subscriber ID and list IDs to organize contacts for targeted campaigns and communications.
Instructions
Przypisuje kontakt do listy
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| listIds | Yes | Lista ID list | |
| subscriberId | Yes | ID kontaktu |
Implementation Reference
- src/fluentcrm-mcp-server.ts:175-181 (handler)The main handler function in FluentCRMClient class that implements the tool logic by posting to the FluentCRM API endpoint `/subscribers/{subscriberId}/lists` with the listIds.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:660-670 (schema)Tool schema definition including name, description, and input schema validation for subscriberId (number) and listIds (array of numbers).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 (registration)Registration in the CallToolRequestSchema switch statement that dispatches the tool call to the client.attachContactToList handler.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) }] };
- src/fluentcrm-mcp-server.ts:484-936 (registration)The tool is registered in the ListToolsRequestSchema handler by including its schema in the tools array returned.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ // ===== KONTAKTY ===== { name: 'fluentcrm_list_contacts', description: 'Pobiera listę wszystkich kontaktów z FluentCRM', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Numer strony (default: 1)' }, per_page: { type: 'number', description: 'Ilość rekordów na stronę (default: 10)' }, search: { type: 'string', description: 'Szukaj po emailu/imieniu' }, }, }, }, { name: 'fluentcrm_get_contact', description: 'Pobiera szczegóły konkretnego kontaktu', inputSchema: { type: 'object', properties: { subscriberId: { type: 'number', description: 'ID kontaktu' }, }, required: ['subscriberId'], }, }, { name: 'fluentcrm_find_contact_by_email', description: 'Wyszukuje kontakt po adresie email', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Adres email' }, }, required: ['email'], }, }, { name: 'fluentcrm_create_contact', description: 'Tworzy nowy kontakt w FluentCRM', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Email kontaktu' }, first_name: { type: 'string', description: 'Imię' }, last_name: { type: 'string', description: 'Nazwisko' }, phone: { type: 'string', description: 'Numer telefonu' }, address_line_1: { type: 'string', description: 'Adres' }, city: { type: 'string', description: 'Miasto' }, country: { type: 'string', description: 'Kraj' }, }, required: ['email'], }, }, { name: 'fluentcrm_update_contact', description: 'Aktualizuje dane kontaktu', inputSchema: { type: 'object', properties: { subscriberId: { type: 'number', description: 'ID kontaktu' }, first_name: { type: 'string' }, last_name: { type: 'string' }, phone: { type: 'string' }, }, required: ['subscriberId'], }, }, { name: 'fluentcrm_delete_contact', description: 'Usuwa kontakt z FluentCRM', inputSchema: { type: 'object', properties: { subscriberId: { type: 'number', description: 'ID kontaktu do usunięcia' }, }, required: ['subscriberId'], }, }, // ===== TAGI ===== { name: 'fluentcrm_list_tags', description: 'Pobiera wszystkie tagi z FluentCRM', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Numer strony' }, search: { type: 'string', description: 'Szukaj tagu' }, }, }, }, { name: 'fluentcrm_create_tag', description: 'Tworzy nowy tag w FluentCRM', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Nazwa tagu (np. "AW-progress-75")' }, slug: { type: 'string', description: 'Slug tagu (np. "aw-progress-75")' }, description: { type: 'string', description: 'Opis tagu' }, }, required: ['title'], }, }, { name: 'fluentcrm_delete_tag', description: 'Usuwa tag z FluentCRM', inputSchema: { type: 'object', properties: { tagId: { type: 'number', description: 'ID tagu' }, }, required: ['tagId'], }, }, { name: 'fluentcrm_attach_tag_to_contact', description: 'Przypisuje tag do kontaktu', inputSchema: { type: 'object', properties: { subscriberId: { type: 'number', description: 'ID kontaktu' }, tagIds: { type: 'array', items: { type: 'number' }, description: 'Lista ID tagów' }, }, required: ['subscriberId', 'tagIds'], }, }, { name: 'fluentcrm_detach_tag_from_contact', description: 'Usuwa tag z kontaktu', inputSchema: { type: 'object', properties: { subscriberId: { type: 'number', description: 'ID kontaktu' }, tagIds: { type: 'array', items: { type: 'number' }, description: 'Lista ID tagów' }, }, required: ['subscriberId', 'tagIds'], }, }, // ===== LISTY ===== { name: 'fluentcrm_list_lists', description: 'Pobiera wszystkie listy z FluentCRM', inputSchema: { type: 'object', properties: {}, }, }, { name: 'fluentcrm_create_list', description: 'Tworzy nową listę w FluentCRM', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Nazwa listy' }, slug: { type: 'string', description: 'Slug listy' }, description: { type: 'string', description: 'Opis listy' }, }, required: ['title'], }, }, { name: 'fluentcrm_delete_list', description: 'Usuwa listę z FluentCRM', inputSchema: { type: 'object', properties: { listId: { type: 'number', description: 'ID listy' }, }, required: ['listId'], }, }, { 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'], }, }, { name: 'fluentcrm_detach_contact_from_list', description: 'Usuwa kontakt z listy', inputSchema: { type: 'object', properties: { subscriberId: { type: 'number', description: 'ID kontaktu' }, listIds: { type: 'array', items: { type: 'number' }, description: 'Lista ID list' }, }, required: ['subscriberId', 'listIds'], }, }, // ===== KAMPANIE ===== { name: 'fluentcrm_list_campaigns', description: 'Pobiera listę kampanii email', inputSchema: { type: 'object', properties: { page: { type: 'number' }, search: { type: 'string' }, }, }, }, { name: 'fluentcrm_create_campaign', description: 'Tworzy nową kampanię email', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Tytuł kampanii' }, subject: { type: 'string', description: 'Temat emaila' }, template_id: { type: 'number', description: 'ID szablonu' }, recipient_list: { type: 'array', items: { type: 'number' }, description: 'ID list' }, }, required: ['title', 'subject'], }, }, { name: 'fluentcrm_pause_campaign', description: 'Wstrzymuje kampanię', inputSchema: { type: 'object', properties: { campaignId: { type: 'number', description: 'ID kampanii' }, }, required: ['campaignId'], }, }, { name: 'fluentcrm_resume_campaign', description: 'Wznawia kampanię', inputSchema: { type: 'object', properties: { campaignId: { type: 'number', description: 'ID kampanii' }, }, required: ['campaignId'], }, }, { name: 'fluentcrm_delete_campaign', description: 'Usuwa kampanię', inputSchema: { type: 'object', properties: { campaignId: { type: 'number', description: 'ID kampanii' }, }, required: ['campaignId'], }, }, // ===== EMAIL TEMPLATES ===== { name: 'fluentcrm_list_email_templates', description: 'Pobiera szablony email', inputSchema: { type: 'object', properties: {}, }, }, { name: 'fluentcrm_create_email_template', description: 'Tworzy nowy szablon email', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Nazwa szablonu' }, subject: { type: 'string', description: 'Temat' }, body: { type: 'string', description: 'Treść HTML' }, }, required: ['title', 'subject', 'body'], }, }, // ===== AUTOMATYZACJE ===== { name: 'fluentcrm_list_automations', description: 'Pobiera automatyzacje (funnels)', inputSchema: { type: 'object', properties: { page: { type: 'number' }, search: { type: 'string' }, }, }, }, { name: 'fluentcrm_create_automation', description: 'Tworzy nową automatyzację', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Nazwa automatyzacji' }, description: { type: 'string' }, trigger: { type: 'string', description: 'Typ triggera' }, }, required: ['title', 'trigger'], }, }, // ===== WEBHOOKS ===== { name: 'fluentcrm_list_webhooks', description: 'Pobiera webhooks', inputSchema: { type: 'object', properties: {}, }, }, { name: 'fluentcrm_create_webhook', description: 'Tworzy nowy webhook', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nazwa webhook' }, url: { type: 'string', description: 'URL webhook' }, status: { type: 'string', enum: ['pending', 'subscribed'] }, tags: { type: 'array', items: { type: 'number' } }, lists: { type: 'array', items: { type: 'number' } }, }, required: ['name', 'url', 'status'], }, }, // ===== SMART LINKS ===== { name: 'fluentcrm_list_smart_links', description: 'Pobiera listę Smart Links z FluentCRM (może nie być dostępne w obecnej wersji)', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Numer strony' }, search: { type: 'string', description: 'Szukaj Smart Link' }, }, }, }, { name: 'fluentcrm_get_smart_link', description: 'Pobiera szczegóły konkretnego Smart Link', inputSchema: { type: 'object', properties: { smartLinkId: { type: 'number', description: 'ID Smart Link' }, }, required: ['smartLinkId'], }, }, { name: 'fluentcrm_create_smart_link', description: 'Tworzy nowy Smart Link (może nie być dostępne w obecnej wersji)', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Nazwa Smart Link (np. "AW-Link-Webinar-Mail")' }, slug: { type: 'string', description: 'Slug (np. "aw-link-webinar-mail")' }, target_url: { type: 'string', description: 'Docelowy URL' }, apply_tags: { type: 'array', items: { type: 'number' }, description: 'ID tagów do dodania po kliknięciu' }, apply_lists: { type: 'array', items: { type: 'number' }, description: 'ID list do dodania po kliknięciu' }, remove_tags: { type: 'array', items: { type: 'number' }, description: 'ID tagów do usunięcia po kliknięciu' }, remove_lists: { type: 'array', items: { type: 'number' }, description: 'ID list do usunięcia po kliknięciu' }, auto_login: { type: 'boolean', description: 'Czy automatycznie logować użytkownika' }, }, required: ['title', 'target_url'], }, }, { name: 'fluentcrm_update_smart_link', description: 'Aktualizuje Smart Link (może nie być dostępne w obecnej wersji)', inputSchema: { type: 'object', properties: { smartLinkId: { type: 'number', description: 'ID Smart Link' }, title: { type: 'string' }, target_url: { type: 'string' }, apply_tags: { type: 'array', items: { type: 'number' } }, apply_lists: { type: 'array', items: { type: 'number' } }, remove_tags: { type: 'array', items: { type: 'number' } }, remove_lists: { type: 'array', items: { type: 'number' } }, auto_login: { type: 'boolean' }, }, required: ['smartLinkId'], }, }, { name: 'fluentcrm_delete_smart_link', description: 'Usuwa Smart Link (może nie być dostępne w obecnej wersji)', inputSchema: { type: 'object', properties: { smartLinkId: { type: 'number', description: 'ID Smart Link do usunięcia' }, }, required: ['smartLinkId'], }, }, { name: 'fluentcrm_generate_smart_link_shortcode', description: 'Generuje shortcode dla Smart Link', inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug Smart Link' }, linkText: { type: 'string', description: 'Tekst linku (opcjonalny)' }, }, required: ['slug'], }, }, { name: 'fluentcrm_validate_smart_link_data', description: 'Waliduje dane Smart Link przed utworzeniem', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Nazwa Smart Link' }, slug: { type: 'string', description: 'Slug' }, target_url: { type: 'string', description: 'Docelowy URL' }, apply_tags: { type: 'array', items: { type: 'number' } }, apply_lists: { type: 'array', items: { type: 'number' } }, remove_tags: { type: 'array', items: { type: 'number' } }, remove_lists: { type: 'array', items: { type: 'number' } }, auto_login: { type: 'boolean' }, }, required: ['title', 'target_url'], }, }, // ===== RAPORTY ===== { name: 'fluentcrm_dashboard_stats', description: 'Pobiera statystyki dashboarda', inputSchema: { type: 'object', properties: {}, }, }, { name: 'fluentcrm_custom_fields', description: 'Pobiera pola niestandardowe', inputSchema: { type: 'object', properties: {}, }, }, ],