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

send_connection_request

Send LinkedIn connection requests to specific profiles using their URL, with optional personalized notes and email addresses when required.

Instructions

Allows you to send a connection request to a person (st.sendConnectionRequest action).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personUrlYesPublic or hashed LinkedIn URL of the person you want to send a connection request to. (e.g., 'https://www.linkedin.com/in/john-doe')
noteNoOptional. Note to include with the connection request.
emailNoOptional. Email address required by some people for sending connection requests to them. If it is required and not provided, the connection request will fail.

Implementation Reference

  • Defines the SendConnectionRequestTool class, which implements the core logic for the 'send_connection_request' tool. It specifies the tool name, the LinkedAPI operation name, input validation schema, and the MCP tool definition including detailed input schema and description.
    export class SendConnectionRequestTool extends OperationTool<
      TSendConnectionRequestParams,
      unknown
    > {
      public override readonly name = 'send_connection_request';
      public override readonly operationName = OPERATION_NAME.sendConnectionRequest;
      protected override readonly schema = z.object({
        personUrl: z.string(),
        note: z.string().optional(),
        email: z.string().optional(),
      });
    
      public override getTool(): Tool {
        return {
          name: this.name,
          description:
            'Allows you to send a connection request to a person (st.sendConnectionRequest action).',
          inputSchema: {
            type: 'object',
            properties: {
              personUrl: {
                type: 'string',
                description:
                  "Public or hashed LinkedIn URL of the person you want to send a connection request to. (e.g., 'https://www.linkedin.com/in/john-doe')",
              },
              note: {
                type: 'string',
                description: 'Optional. Note to include with the connection request.',
              },
              email: {
                type: 'string',
                description:
                  'Optional. Email address required by some people for sending connection requests to them. If it is required and not provided, the connection request will fail.',
              },
            },
            required: ['personUrl'],
          },
        };
      }
    }
  • Base OperationTool class that provides the execute method, which is the actual handler logic. It locates the specific LinkedAPI operation by operationName and executes it with progress tracking.
    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,
        });
      }
    }
  • Registers the SendConnectionRequestTool instance in the LinkedApiTools collection by instantiating it and adding to the tools array.
    new SendConnectionRequestTool(progressCallback),
  • In the MCP server, getTools() method exposes all tools including send_connection_request by calling getTool() on each.
    public getTools(): Tool[] {
      return this.tools.tools.map((tool) => tool.getTool());
  • Zod schema defining input parameters for validation: personUrl (required), note (optional), email (optional). Also detailed in inputSchema of getTool().
    protected override readonly schema = z.object({
      personUrl: z.string(),
      note: z.string().optional(),
      email: z.string().optional(),
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the action but lacks critical details: it doesn't mention authentication requirements, rate limits, whether it's idempotent, what happens on success/failure (e.g., does it return a request ID?), or LinkedIn-specific constraints (e.g., daily limits). The description adds minimal value beyond the tool name, leaving key behaviors undocumented.

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

Conciseness3/5

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

The description is a single sentence, which is concise, but it's not front-loaded with the most critical information. It starts with the redundant phrase 'Allows you to' and includes an internal reference ('st.sendConnectionRequest action') that adds no value for an AI agent. While brief, it could be more efficiently structured to emphasize the core action and context.

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 no annotations, no output schema, and a mutation tool (sending a request), the description is incomplete. It lacks details on behavioral traits (e.g., side effects, error handling), return values, or platform-specific nuances. For a tool that performs a write operation with potential failures, this minimal description leaves significant gaps in understanding how to use it effectively.

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?

Schema description coverage is 100%, so the schema fully documents all parameters (personUrl, note, email). The description adds no parameter-specific information beyond what's in the schema, such as explaining how 'personUrl' relates to LinkedIn or when 'email' is required. With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

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

Purpose3/5

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

The description states the action ('send a connection request') and target ('to a person'), which clarifies the basic purpose. However, it's somewhat vague as it doesn't specify the platform (LinkedIn is only implied via the parameter description) or differentiate from sibling tools like 'send_message' or 'withdraw_connection_request' beyond the action name. The phrase 'Allows you to' adds no value, making it less specific.

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. It doesn't mention prerequisites (e.g., needing to be logged in), exclusions (e.g., not for existing connections), or compare to siblings like 'send_message' or 'remove_connection'. Usage is implied only by the action name, with no explicit context for selection.

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