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

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
NameRequiredDescriptionDefault
personUrlYesLinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe')
textYesThe message text, must be up to 1900 characters.
subjectYesSubject line, must be up to 80 characters.

Implementation Reference

  • 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'],
          },
        };
      }
    }
  • Instantiation and registration of NvSendMessageTool instance into the LinkedApiTools collection.
    new NvSendMessageTool(progressCallback),
  • 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,
        });
      }
    }
  • 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(),
    });
  • 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());
    }

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