Skip to main content
Glama

fluentcrm_validate_smart_link_data

Validate Smart Link data before creation in FluentCRM to ensure proper configuration and prevent errors.

Instructions

Waliduje dane Smart Link przed utworzeniem

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesNazwa Smart Link
slugNoSlug
target_urlYesDocelowy URL
apply_tagsNo
apply_listsNo
remove_tagsNo
remove_listsNo
auto_loginNo

Implementation Reference

  • Core handler function implementing the Smart Link data validation logic in the FluentCRMClient class. Validates title, target_url (required string, http protocol), and optional slug format.
    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 }; }
  • Tool registration in the MCP server's ListToolsRequestSchema handler, defining name, description, and input schema.
    { 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'], }, },
  • Input schema definition for the tool, specifying properties and required fields.
    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'], },
  • MCP server dispatch handler for the tool call, invoking the client.validateSmartLinkData method.
    case 'fluentcrm_validate_smart_link_data': return { content: [{ type: 'text', text: JSON.stringify(client.validateSmartLinkData(args as any), null, 2) }] };
  • Comment indicating the validateSmartLinkData is a helper utility.
    // Helper method to validate Smart Link data

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/netflyapp/fluentcrm-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server