remove_connection
Remove a LinkedIn connection by providing their profile URL to manage your professional network connections.
Instructions
Allows you to remove a person from your connections (st.removeConnection action).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| personUrl | Yes | Public or hashed LinkedIn URL of the person you want to remove from your connections. (e.g., 'https://www.linkedin.com/in/john-doe') |
Implementation Reference
- src/tools/remove-connection.ts:7-32 (handler)The RemoveConnectionTool class that implements the MCP tool 'remove_connection' by extending OperationTool, specifying the name, operationName from linkedapi-node, input schema, and Tool interface via getTool().export class RemoveConnectionTool extends OperationTool<TRemoveConnectionParams, unknown> { public override readonly name = 'remove_connection'; public override readonly operationName = OPERATION_NAME.removeConnection; protected override readonly schema = z.object({ personUrl: z.string(), }); public override getTool(): Tool { return { name: this.name, description: 'Allows you to remove a person from your connections (st.removeConnection action).', inputSchema: { type: 'object', properties: { personUrl: { type: 'string', description: "Public or hashed LinkedIn URL of the person you want to remove from your connections. (e.g., 'https://www.linkedin.com/in/john-doe')", }, }, required: ['personUrl'], }, }; } }
- src/tools/remove-connection.ts:10-12 (schema)Zod input schema defining 'personUrl' as required string parameter.protected override readonly schema = z.object({ personUrl: z.string(), });
- src/linked-api-tools.ts:44-44 (registration)Instantiation of RemoveConnectionTool within the LinkedApiTools constructor's tools array.new RemoveConnectionTool(progressCallback),
- src/utils/linked-api-tool.ts:36-58 (helper)Base OperationTool class providing the core execute logic by finding and invoking the LinkedAPI operation corresponding to the tool's operationName.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, }); } }
- src/linked-api-server.ts:22-24 (registration)Registration of all LinkedAPI tools (including remove_connection) into the MCP server via getTools() method.public getTools(): Tool[] { return this.tools.tools.map((tool) => tool.getTool()); }