nv_send_message
Send personalized messages to LinkedIn Sales Navigator contacts using their profile URL, subject line, and message text.
Instructions
Allows you to send a message to a person in Sales Navigator (nv.sendMessage action)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| personUrl | Yes | LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe') | |
| text | Yes | The message text, must be up to 1900 characters. | |
| subject | Yes | Subject line, must be up to 80 characters. |
Implementation Reference
- src/tools/nv-send-message.ts:7-42 (handler)Core implementation of the 'nv_send_message' tool as NvSendMessageTool class, including name, operation mapping, Zod schema for validation, and MCP Tool descriptor via getTool().export class NvSendMessageTool extends OperationTool<TNvSendMessageParams, unknown> { public override readonly name = 'nv_send_message'; public override readonly operationName = OPERATION_NAME.nvSendMessage; protected override readonly schema = z.object({ personUrl: z.string(), text: z.string().min(1), subject: z.string().optional(), }); public override getTool(): Tool { return { name: this.name, description: 'Allows you to send a message to a person in Sales Navigator (nv.sendMessage action)', inputSchema: { type: 'object', properties: { personUrl: { type: 'string', description: "LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe')", }, text: { type: 'string', description: 'The message text, must be up to 1900 characters.', }, subject: { type: 'string', description: 'Subject line, must be up to 80 characters.', }, }, required: ['personUrl', 'text', 'subject'], }, }; } }
- src/linked-api-tools.ts:56-56 (registration)Instantiation and registration of NvSendMessageTool instance into the LinkedApiTools collection.new NvSendMessageTool(progressCallback),
- src/utils/linked-api-tool.ts:36-58 (helper)Base OperationTool class providing the execute method, which is the handler logic for all operation-based tools including nv_send_message, by mapping to LinkedAPI operation and executing 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, }); } }
- src/tools/nv-send-message.ts:10-14 (schema)Zod schema for input validation of nv_send_message tool parameters.protected override readonly schema = z.object({ personUrl: z.string(), text: z.string().min(1), subject: z.string().optional(), });
- src/linked-api-server.ts:22-24 (registration)MCP server method that registers all tools, including nv_send_message, by exposing their Tool descriptors.public getTools(): Tool[] { return this.tools.tools.map((tool) => tool.getTool()); }