Skip to main content
Glama

fluentcrm_create_smart_link

Create smart links in FluentCRM that track clicks and automatically manage contact tags and lists based on user interactions.

Instructions

Tworzy nowy Smart Link (może nie być dostępne w obecnej wersji)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesNazwa Smart Link (np. "AW-Link-Webinar-Mail")
slugNoSlug (np. "aw-link-webinar-mail")
target_urlYesDocelowy URL
apply_tagsNoID tagów do dodania po kliknięciu
apply_listsNoID list do dodania po kliknięciu
remove_tagsNoID tagów do usunięcia po kliknięciu
remove_listsNoID list do usunięcia po kliknięciu
auto_loginNoCzy automatycznie logować użytkownika

Implementation Reference

  • Core handler function in FluentCRMClient that attempts to create a Smart Link via POST /smart-links, with graceful 404 handling indicating feature unavailability.
    async createSmartLink(data: {
      title: string;
      slug?: string;
      target_url: string;
      apply_tags?: number[];
      apply_lists?: number[];
      remove_tags?: number[];
      remove_lists?: number[];
      auto_login?: boolean;
    }) {
      try {
        const response = await this.apiClient.post('/smart-links', data);
        return response.data;
      } catch (error: any) {
        if (error.response?.status === 404) {
          return {
            success: false,
            message: "Smart Links API endpoint not available yet in FluentCRM",
            suggestion: "Create Smart Link manually in FluentCRM admin panel",
            recommended_data: data
          };
        }
        throw error;
      }
  • Tool registration in MCP server's tools list, including name, description, and detailed input schema.
      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'],
      },
    },
  • MCP server request handler switch case that invokes the client.createSmartLink method with tool arguments.
    case 'fluentcrm_create_smart_link':
      return { content: [{ type: 'text', text: JSON.stringify(await client.createSmartLink(args as any), null, 2) }] };
  • Input schema definition for the tool, specifying parameters and validation rules.
    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'],
    },
  • Supporting validation method for Smart Link data used by related tools.
    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
      };
    }

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