Skip to main content
Glama
felipfr

LinkedIn MCP Server

by felipfr

send_message

Send direct messages to LinkedIn connections using profile ID, subject, and body. Facilitates secure and structured communication with your network through the Model Context Protocol.

Instructions

Send direct messages to your LinkedIn connections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesMessage body
recipientIdYesRecipient LinkedIn profile ID
subjectYesMessage subject

Implementation Reference

  • Core handler function that constructs the message payload and sends it to the LinkedIn /messages API endpoint using makeRequest.
    public async sendMessage(params: SendMessageParams): Promise<MessageResponse> {
      const messageData = {
        recipients: {
          person: params.recipientUrn
        },
        subject: params.subject,
        body: params.messageBody,
        messageType: 'INMAIL'
      }
      return this.makeRequest<MessageResponse>('post', '/messages', messageData)
    }
  • src/server.ts:124-141 (registration)
    Registers the 'send-message' MCP tool with description, input schema, and an inline handler that logs, calls clientService.sendMessage, and formats the response.
    // Send Message Tool
    this.server.tool(
      'send-message',
      'Send a message to a LinkedIn connection',
      linkedinApiSchemas.sendMessage,
      async (params) => {
        this.logger.info('Sending LinkedIn Message', {
          recipientUrn: params.recipientUrn
        })
        try {
          const result = await this.clientService.sendMessage(params)
          return this.createResourceResponse(result)
        } catch (error) {
          this.logger.error('LinkedIn Message Sending Failed', error)
          throw error
        }
      }
    )
  • Zod schema defining the input parameters for the sendMessage tool: recipientUrn, messageBody, and optional subject.
    /**
     * Schema for sending messages on LinkedIn
     */
    sendMessage: {
      messageBody: z.string().describe('Content of the message to send'),
      recipientUrn: z.string().describe('URN of the message recipient'),
      subject: z.string().optional().default('LinkedIn Connection').describe('Subject of the message')
    }
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. It mentions sending messages but doesn't disclose behavioral traits like whether this requires specific permissions, rate limits, if messages are reversible, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse 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 messaging tool with no annotations, no output schema, and incomplete behavioral disclosure, the description is inadequate. It doesn't cover key aspects like response format, error handling, or integration with sibling tools (e.g., 'get_conversations'), 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?

Schema description coverage is 100%, so the schema already documents all three parameters (body, recipientId, subject) with basic descriptions. The description adds no additional meaning beyond what the schema provides, such as format details or usage examples, resulting in the baseline score 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 ('send direct messages') and target ('your LinkedIn connections'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get_messages' or 'get_conversations' beyond the obvious action difference, missing explicit 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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing authentication via 'authenticate_linkedin'), context (e.g., for outreach vs. existing conversations), or exclusions (e.g., not for group messages). The description only states what it does, not when to use it.

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

Related 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/felipfr/linkedin-mcpserver'

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