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

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
NameRequiredDescriptionDefault
personUrlYesPublic 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

  • 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'],
          },
        };
      }
    }
  • Zod input schema defining 'personUrl' as required string parameter.
    protected override readonly schema = z.object({
      personUrl: z.string(),
    });
  • Instantiation of RemoveConnectionTool within the LinkedApiTools constructor's tools array.
    new RemoveConnectionTool(progressCallback),
  • 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,
        });
      }
    }
  • 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());
    }
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 is 'remove a person from your connections', implying a destructive mutation, but fails to detail critical aspects like required permissions, irreversible effects, rate limits, or error handling. This leaves significant gaps in understanding the tool's behavior and risks.

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

Conciseness4/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, though it could be slightly more polished by omitting the parenthetical reference to 'st.removeConnection action', which adds minimal value.

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 tool's complexity as a destructive mutation with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., permanence, side effects), response format, or error conditions, making it inadequate for safe and effective use by an AI agent in this context.

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 input schema has 100% description coverage, fully documenting the 'personUrl' parameter with examples. The description adds no additional parameter semantics beyond what the schema provides, such as format nuances or validation rules. Given the high schema coverage, a baseline score of 3 is appropriate, as the description does not compensate but also does not detract.

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 ('remove a person from your connections') and identifies the resource ('connections'), which is specific and unambiguous. However, it does not explicitly differentiate from sibling tools like 'withdraw_connection_request', which might handle pending requests rather than established connections, leaving some room for improvement in sibling distinction.

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 'withdraw_connection_request' for pending requests or 'retrieve_connections' for viewing connections. It lacks context on prerequisites, exclusions, or specific scenarios, offering minimal usage direction.

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