fluentcrm_generate_smart_link_shortcode
Generate shortcodes for FluentCRM Smart Links to embed trackable marketing links in WordPress content for campaign performance monitoring.
Instructions
Generuje shortcode dla Smart Link
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| linkText | No | Tekst linku (opcjonalny) | |
| slug | Yes | Slug Smart Link |
Implementation Reference
- src/fluentcrm-mcp-server.ts:418-423 (handler)Core handler function in FluentCRMClient class that generates the Smart Link shortcode. Returns either the plain shortcode {{fc_smart_link slug='...'}} or wrapped in an HTML <a> tag if linkText is provided.generateSmartLinkShortcode(slug: string, linkText?: string): string { if (linkText) { return `<a href="{{fc_smart_link slug='${slug}'}}">${linkText}</a>`; } return `{{fc_smart_link slug='${slug}'}}`; }
- src/fluentcrm-mcp-server.ts:891-898 (schema)Input schema defining parameters: slug (required string), linkText (optional string). Part of the tool registration.inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Slug Smart Link' }, linkText: { type: 'string', description: 'Tekst linku (opcjonalny)' }, }, required: ['slug'], },
- src/fluentcrm-mcp-server.ts:888-899 (registration)Tool registration in the MCP server's tools list, including name, description, and input schema.{ 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'], }, },
- src/fluentcrm-mcp-server.ts:1015-1016 (handler)MCP request handler switch case that invokes the client.generateSmartLinkShortcode method and formats the response.case 'fluentcrm_generate_smart_link_shortcode': return { content: [{ type: 'text', text: JSON.stringify({ shortcode: client.generateSmartLinkShortcode((args as any)?.slug, (args as any)?.linkText) }, null, 2) }] };