Skip to main content
Glama
gomessoaresemmanuel-cpu

linkedin-prospection-mcp

personalize_message

Generate personalized LinkedIn messages for leads using their name, job title, and post content to create connection invitations or follow-up DMs.

Instructions

Generate a personalized LinkedIn invitation note or DM for a specific lead. Returns a message ready to copy-paste (max 200 chars for invitations, longer for DMs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesLead's full name
titleNoJob title
post_snippetNoTheir LinkedIn post text
priorityNoP2-warm
message_typeNoType: invitation (max 200 chars), dm1 (first DM after acceptance), dm2 (follow-up J+3), dm3 (final J+7)invitation

Implementation Reference

  • The async handler function for 'personalize_message' which generates an invitation or DM based on the input parameters.
    async ({ name, title, post_snippet, priority, message_type }) => {
      const lead = { name, title, post_snippet, priority: priority ?? "P2-warm" };
      let message: string;
    
      if (message_type === "invitation") {
        message = generateInvitationNote(lead);
        if (message.length > 200) {
          message = message.substring(0, 197) + "...";
        }
      } else {
        const touchMap: Record<string, number> = { dm1: 1, dm2: 2, dm3: 3 };
        message = generateDM(lead, touchMap[message_type] || 1);
      }
    
      return {
        content: [
          {
            type: "text" as const,
            text: [
              `Message type: ${message_type}`,
              `For: ${name}${priority ? ` (${priority})` : ""}`,
              `Length: ${message.length} chars${message_type === "invitation" ? " (max 200)" : ""}`,
              "",
              "---",
              message,
              "---",
            ].join("\n"),
          },
        ],
      };
    },
  • The input schema definition for 'personalize_message' using Zod validation.
    inputSchema: {
      name: z.string().describe("Lead's full name"),
      title: z.string().optional().describe("Job title"),
      post_snippet: z.string().optional().describe("Their LinkedIn post text"),
      priority: z.enum(["P1-hot", "P2-warm", "P3-nurture", "P4-cold"]).default("P2-warm").optional(),
      message_type: z.enum(["invitation", "dm1", "dm2", "dm3"]).default("invitation").describe(
        "Type: invitation (max 200 chars), dm1 (first DM after acceptance), dm2 (follow-up J+3), dm3 (final J+7)",
      ),
    },
  • src/index.ts:401-418 (registration)
    Registration of the 'personalize_message' tool with the MCP server.
    server.registerTool(
      "personalize_message",
      {
        title: "Personalize Outreach Message",
        description:
          "Generate a personalized LinkedIn invitation note or DM for a specific lead. " +
          "Returns a message ready to copy-paste (max 200 chars for invitations, longer for DMs).",
        inputSchema: {
          name: z.string().describe("Lead's full name"),
          title: z.string().optional().describe("Job title"),
          post_snippet: z.string().optional().describe("Their LinkedIn post text"),
          priority: z.enum(["P1-hot", "P2-warm", "P3-nurture", "P4-cold"]).default("P2-warm").optional(),
          message_type: z.enum(["invitation", "dm1", "dm2", "dm3"]).default("invitation").describe(
            "Type: invitation (max 200 chars), dm1 (first DM after acceptance), dm2 (follow-up J+3), dm3 (final J+7)",
          ),
        },
        annotations: { readOnlyHint: true, openWorldHint: false, destructiveHint: false },
      },

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/gomessoaresemmanuel-cpu/linkedin-prospection-mcp'

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