Skip to main content
Glama

send_linkedin_connection

Send LinkedIn connection invitations to expand your professional network using your account credentials. Connect with targeted professionals to build relationships and grow your business contacts.

Instructions

Send a connection invitation to LinkedIn user. Account ID is taken from environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNoTimeout in seconds
userYesRecipient user URN (must include prefix, e.g. fsd_profile:ACoAA...)

Implementation Reference

  • Interface defining the input arguments for the send_linkedin_connection tool: user URN and optional timeout.
    export interface SendLinkedinConnectionArgs {
      user: string;
      timeout?: number;
    }
  • Validator function to check if arguments match SendLinkedinConnectionArgs type.
    export function isValidSendLinkedinConnectionArgs(
      args: unknown
    ): args is SendLinkedinConnectionArgs {
      if (typeof args !== "object" || args === null) return false;
      const obj = args as Record<string, unknown>;
      if (typeof obj.user !== "string" || !obj.user.trim()) return false;
      if (obj.timeout !== undefined && typeof obj.timeout !== "number") return false;
      return true;
    }
  • Closest matching handler implementation for sending LinkedIn connection requests. Note: tool name is 'send_linkedin_connection_request' which closely matches the queried name and uses the USER_CONNECTION endpoint.
    "send_linkedin_connection_request",
    "Send LinkedIn connection request (requires ACCOUNT_ID)",
    {
      user: z.string().describe("User URN (must include prefix)"),
      text: z.string().optional().describe("Optional message"),
      timeout: z.number().default(300).describe("Timeout in seconds")
    },
    async ({ user, text, timeout }) => {
      const normalizedUser = normalizeUserURN(user);
      if (!isValidUserURN(normalizedUser)) {
        return {
          content: [{ type: "text", text: "Invalid URN format. Must start with 'fsd_profile:'" }],
          isError: true
        };
      }
      const requestData: any = { timeout, user: normalizedUser, account_id: ACCOUNT_ID };
      if (text) requestData.text = text;
      log("Sending LinkedIn connection request to user:", normalizedUser);
      try {
        const response = await makeRequest(API_CONFIG.ENDPOINTS.USER_CONNECTION, requestData);
        return {
          content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
        };
      } catch (error) {
        log("LinkedIn connection request error:", error);
        return {
          content: [{ type: "text", text: `LinkedIn connection request API error: ${formatError(error)}` }],
          isError: true
        };
      }
    }
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 mentions the action 'send' implying a write operation but lacks details on permissions, rate limits, confirmation of success, or potential side effects (e.g., LinkedIn's invitation limits). This leaves significant gaps for a mutation tool.

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 front-loads the core purpose. It avoids unnecessary words, though it could be slightly more structured by separating authentication details from the action. Overall, it's appropriately sized with minimal waste.

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 is a mutation (sending an invitation) with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., success criteria, error handling), output expectations, and detailed usage context, making it inadequate for safe and effective use by an AI agent.

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, clearly documenting both parameters ('user' and 'timeout'). The description adds no additional parameter semantics beyond what's in the schema, such as format examples for 'user' beyond the schema's note or context for 'timeout' usage. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('Send a connection invitation') and target resource ('LinkedIn user'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'send_linkedin_chat_message' or 'send_linkedin_post' beyond the resource type, missing explicit distinction in the action context.

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 minimal guidance by noting that 'Account ID is taken from environment,' which hints at authentication but doesn't specify when to use this tool versus alternatives like 'get_linkedin_user_connections' for viewing connections or 'send_linkedin_chat_message' for messaging. No explicit when/when-not or alternative recommendations are included.

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/anysiteio/hdw-mcp-server'

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