Skip to main content
Glama
Linked-API
by Linked-API

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';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but does not cover critical aspects like whether this is a destructive operation, what permissions are required, potential side effects (e.g., impact on follow status), or error handling. The mention of 'unfollow' in the schema hints at behavior, but the description does not elaborate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action, making it easy to understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a mutation tool (withdrawing a request) and the lack of annotations and output schema, the description is insufficient. It does not address behavioral traits, error conditions, or what happens upon success, leaving significant gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema fully documents both parameters. The description adds no additional meaning beyond what the schema provides, such as explaining the relationship between 'personUrl' and 'unfollow' or usage examples. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('withdraw the connection request') and the target ('sent to a person'), which is specific and unambiguous. However, it does not explicitly differentiate from sibling tools like 'remove_connection' or 'retrieve_pending_requests', which might handle related but distinct operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as 'remove_connection' for existing connections or 'retrieve_pending_requests' to check status. It mentions the action but lacks context on prerequisites (e.g., only usable for pending requests) or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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