sync_conversation
Sync LinkedIn conversations to enable polling and interaction for AI assistants via the Linked API MCP server, ensuring seamless communication integration.
Instructions
Allows you to sync a conversation so you can start polling it (st.syncConversation action).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| personUrl | Yes | The LinkedIn URL of the person whose conversation you want to synchronize (e.g., 'https://www.linkedin.com/in/john-doe') |
Implementation Reference
- src/tools/sync-conversation.ts:7-32 (handler)The SyncConversationTool class implements the core logic for the 'sync_conversation' tool. It specifies the tool name, links to the library's operation, defines the input schema using Zod, and provides the tool metadata including description and input schema for MCP.export class SyncConversationTool extends OperationTool<TSyncConversationParams, unknown> { public override readonly name = 'sync_conversation'; public override readonly operationName = OPERATION_NAME.syncConversation; protected override readonly schema = z.object({ personUrl: z.string(), }); public override getTool(): Tool { return { name: this.name, description: 'Allows you to sync a conversation so you can start polling it (st.syncConversation action).', inputSchema: { type: 'object', properties: { personUrl: { type: 'string', description: "The LinkedIn URL of the person whose conversation you want to synchronize (e.g., 'https://www.linkedin.com/in/john-doe')", }, }, required: ['personUrl'], }, }; } }
- src/tools/sync-conversation.ts:10-12 (schema)Zod schema for input validation: requires 'personUrl' as a string.protected override readonly schema = z.object({ personUrl: z.string(), });
- src/utils/linked-api-tool.ts:36-59 (helper)Base OperationTool class that provides the execute method, which locates the corresponding operation in the LinkedApi instance and executes it with progress support. This is the actual execution logic delegated to by SyncConversationTool.export abstract class OperationTool<TParams, TResult> extends LinkedApiTool<TParams, TResult> { public abstract readonly operationName: TOperationName; public override execute({ linkedapi, args, workflowTimeout, progressToken, }: { linkedapi: LinkedApi; args: TParams; workflowTimeout: number; progressToken?: string | number; }): Promise<TMappedResponse<TResult>> { const operation = linkedapi.operations.find( (operation) => operation.operationName === this.operationName, )! as Operation<TParams, TResult>; return executeWithProgress(this.progressCallback, operation, workflowTimeout, { params: args, progressToken, }); } }