Skip to main content
Glama
felipfr
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') }

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