UNPKG

mcp-mautic-server

Version:

MCP server for Mautic marketing automation platform integration

1,020 lines (1,019 loc) 33.6 kB
import { MauticClient } from './client.js'; export declare class MauticTools { private client; constructor(client: MauticClient); private filterContactResponse; getToolDefinitions(): ({ name: string; description: string; inputSchema: { type: string; properties: { limit: { type: string; description: string; minimum: number; maximum: number; default: number; }; search: { type: string; description: string; }; orderBy: { type: string; enum: string[]; description: string; }; orderByDir: { type: string; enum: string[]; description: string; default: string; }; start: { type: string; description: string; minimum: number; default: number; }; minimal: { type: string; description: string; default: boolean; }; fullResponse: { type: string; description: string; default: boolean; }; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required?: undefined; }; } | { name: string; description: string; inputSchema: { type: string; properties: { id: { type: string; description: string; }; fullResponse: { type: string; description: string; default: boolean; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { email: { type: string; format: string; description: string; }; firstname: { type: string; description: string; }; lastname: { type: string; description: string; }; company: { type: string; description: string; }; phone: { type: string; description: string; }; fullResponse: { type: string; description: string; default: boolean; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; id?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { id: { type: string; description: string; }; email: { type: string; format: string; description: string; }; firstname: { type: string; description: string; }; lastname: { type: string; description: string; }; company: { type: string; description: string; }; phone: { type: string; description: string; }; fullResponse: { type: string; description: string; default: boolean; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { id: { type: string; description: string; }; confirm: { type: string; description: string; }; fullResponse: { type: string; description: string; default: boolean; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { table: { type: string; enum: string[]; description: string; }; limit: { type: string; description: string; minimum: number; maximum: number; default: number; }; start: { type: string; description: string; minimum: number; default: number; }; search?: undefined; orderBy?: undefined; orderByDir?: undefined; minimal?: undefined; fullResponse?: undefined; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required?: undefined; }; } | { name: string; description: string; inputSchema: { type: string; properties: { type: { type: string; enum: string[]; description: string; }; dateFrom: { type: string; description: string; }; dateTo: { type: string; description: string; }; timeUnit: { type: string; enum: string[]; description: string; default: string; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required?: undefined; }; } | { name: string; description: string; inputSchema: { type: string; properties: { contactId: { type: string; description: string; }; search: { type: string; description: string; }; includeEvents: { type: string; items: { type: string; enum: string[]; }; description: string; }; limit?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { limit: { type: string; description: string; minimum: number; maximum: number; default: number; }; search: { type: string; description: string; }; orderBy: { type: string; enum: string[]; description: string; }; orderByDir: { type: string; enum: string[]; description: string; default: string; }; start: { type: string; description: string; minimum: number; default: number; }; publishedOnly: { type: string; description: string; default: boolean; }; minimal: { type: string; description: string; default: boolean; }; fullResponse?: undefined; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required?: undefined; }; } | { name: string; description: string; inputSchema: { type: string; properties: { id: { type: string; description: string; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { title: { type: string; description: string; }; description: { type: string; description: string; }; alias: { type: string; description: string; }; language: { type: string; description: string; }; isPublished: { type: string; description: string; default: boolean; }; storageLocation: { type: string; enum: string[]; description: string; default: string; }; remotePath: { type: string; description: string; }; category: { type: string; description: string; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { id: { type: string; description: string; }; title: { type: string; description: string; }; description: { type: string; description: string; }; alias: { type: string; description: string; }; language: { type: string; description: string; }; isPublished: { type: string; description: string; default?: undefined; }; category: { type: string; description: string; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; storageLocation?: undefined; remotePath?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { id: { type: string; description: string; }; confirm: { type: string; description: string; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { name: { type: string; description: string; }; alias: { type: string; description: string; }; description: { type: string; description: string; }; isPublished: { type: string; description: string; default: boolean; }; filters: { type: string; description: string; items: { type: string; properties: { glue: { type: string; enum: string[]; description: string; }; field: { type: string; description: string; }; operator: { type: string; enum: string[]; description: string; }; filter: { description: string; }; }; }; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; language?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { id: { type: string; description: string; }; name: { type: string; description: string; }; alias: { type: string; description: string; }; description: { type: string; description: string; }; isPublished: { type: string; description: string; default?: undefined; }; filters: { type: string; description: string; items: { type: string; properties: { glue: { type: string; enum: string[]; description: string; }; field: { type: string; description: string; }; operator: { type: string; enum: string[]; description: string; }; filter: { description: string; }; }; }; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; contactId?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; language?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; segmentId?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { segmentId: { type: string; description: string; }; contactId: { type: string; description: string; }; limit?: undefined; search?: undefined; orderBy?: undefined; orderByDir?: undefined; start?: undefined; minimal?: undefined; fullResponse?: undefined; id?: undefined; email?: undefined; firstname?: undefined; lastname?: undefined; company?: undefined; phone?: undefined; confirm?: undefined; table?: undefined; type?: undefined; dateFrom?: undefined; dateTo?: undefined; timeUnit?: undefined; includeEvents?: undefined; publishedOnly?: undefined; title?: undefined; description?: undefined; alias?: undefined; language?: undefined; isPublished?: undefined; storageLocation?: undefined; remotePath?: undefined; category?: undefined; name?: undefined; filters?: undefined; }; required: string[]; }; })[]; executeTool(name: string, args: any): Promise<{ content: { type: string; text: string; }[]; } | { content: { type: string; text: string; }[]; isError: boolean; }>; private getContact; private listContacts; private createContact; private updateContact; private deleteContact; private getStats; private getDashboardData; private getContactActivity; private listAssets; private getAsset; private createAsset; private updateAsset; private deleteAsset; private listSegments; private getSegment; private createSegment; private updateSegment; private deleteSegment; private addContactToSegment; private removeContactFromSegment; }