fluentcrm_validate_smart_link_data
Validate Smart Link data before creation to ensure proper configuration of title, URL, tags, lists, and auto-login settings in FluentCRM marketing automation.
Instructions
Waliduje dane Smart Link przed utworzeniem
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply_lists | No | ||
| apply_tags | No | ||
| auto_login | No | ||
| remove_lists | No | ||
| remove_tags | No | ||
| slug | No | Slug | |
| target_url | Yes | Docelowy URL | |
| title | Yes | Nazwa Smart Link |
Implementation Reference
- src/fluentcrm-mcp-server.ts:426-449 (handler)Core implementation of the tool logic: validates Smart Link data for required fields (title, target_url), URL format, and slug regex.validateSmartLinkData(data: any): { valid: boolean; errors: string[] } { const errors: string[] = []; if (!data.title || typeof data.title !== 'string') { errors.push('Title is required and must be a string'); } if (!data.target_url || typeof data.target_url !== 'string') { errors.push('Target URL is required and must be a string'); } if (data.target_url && !data.target_url.startsWith('http')) { errors.push('Target URL must start with http:// or https://'); } if (data.slug && !/^[a-z0-9-]+$/.test(data.slug)) { errors.push('Slug must contain only lowercase letters, numbers, and hyphens'); } return { valid: errors.length === 0, errors }; }
- src/fluentcrm-mcp-server.ts:900-917 (schema)Tool registration object defining the name, description, and input schema that matches the validation performed in the handler.{ 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'], }, },
- src/fluentcrm-mcp-server.ts:1017-1018 (registration)Dispatch handler in MCP server's CallToolRequestSchema that routes the tool call to the client.validateSmartLinkData method.case 'fluentcrm_validate_smart_link_data': return { content: [{ type: 'text', text: JSON.stringify(client.validateSmartLinkData(args as any), null, 2) }] };