Skip to main content
Glama

withdraw_connection_request

Cancel a pending LinkedIn connection request using the person's profile URL, with an option to unfollow them simultaneously.

Instructions

Allows you to withdraw the connection request sent to a person (st.withdrawConnectionRequest action).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personUrlYesPublic or hashed LinkedIn URL of the person you want to withdraw the connection request from. (e.g., 'https://www.linkedin.com/in/john-doe')
unfollowNoOptional. Boolean indicating whether you want to unfollow the person when withdrawing the request. The default value is true.

Implementation Reference

  • WithdrawConnectionRequestTool class defining the tool's name, LinkedIn operation name, Zod input schema for validation, and MCP tool metadata including inputSchema and description.
    export class WithdrawConnectionRequestTool extends OperationTool< TWithdrawConnectionRequestParams, unknown > { public override readonly name = 'withdraw_connection_request'; public override readonly operationName = OPERATION_NAME.withdrawConnectionRequest; protected override readonly schema = z.object({ personUrl: z.string(), unfollow: z.boolean().optional(), }); public override getTool(): Tool { return { name: this.name, description: 'Allows you to withdraw the connection request sent to a person (st.withdrawConnectionRequest action).', inputSchema: { type: 'object', properties: { personUrl: { type: 'string', description: "Public or hashed LinkedIn URL of the person you want to withdraw the connection request from. (e.g., 'https://www.linkedin.com/in/john-doe')", }, unfollow: { type: 'boolean', description: 'Optional. Boolean indicating whether you want to unfollow the person when withdrawing the request. The default value is true.', }, }, required: ['personUrl'], }, }; } }
  • Registration of the WithdrawConnectionRequestTool instance in the LinkedApiTools class constructor, adding it to the array of available tools.
    new WithdrawConnectionRequestTool(progressCallback),
  • OperationTool base class implementation of the execute method, which performs the actual API call by finding the operation matching the tool's operationName and executing it with progress notifications.
    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, }); } }
  • Zod schema used for input parameter validation in the tool's validate method.
    protected override readonly schema = z.object({ personUrl: z.string(), unfollow: z.boolean().optional(), });
  • Import statement for the WithdrawConnectionRequestTool class used in registration.
    import { WithdrawConnectionRequestTool } from './tools/withdraw-connection-request.js';

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/Linked-API/linkedapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server