Skip to main content
Glama
gomessoaresemmanuel-cpu

linkedin-prospection-mcp

Personalize Outreach Message

personalize_message
Read-only

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 },
      },
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true (safe computation). Description adds valuable behavioral context: output is 'ready to copy-paste' (indicating it doesn't auto-send), and specifies character constraints (max 200 for invitations, longer for DMs) that clarify output format expectations.

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?

Two sentences with zero waste. First sentence establishes purpose immediately; second sentence provides critical output constraints (character limits, copy-paste ready). Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, description adequately explains return value (copy-paste ready message) and format constraints. With 5 well-documented parameters and clear annotations, description provides sufficient context for invocation, though could explicitly note it generates text without sending it.

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 high (80%) with detailed enum descriptions in the schema itself (e.g., 'dm2 (follow-up J+3)'). Description reinforces the message_type constraints but doesn't add semantic meaning beyond what's in the schema. Baseline 3 appropriate for high-coverage schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'Generate' with clear resource 'LinkedIn invitation note or DM'. Explicitly targets 'specific lead' and distinguishes from sibling tools focused on lead discovery/qualification (find_leads, qualify_leads) rather than content generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context by specifying LinkedIn platform and distinguishing between invitation (connection request) and DM use cases. Lacks explicit 'when not to use' or named alternatives, but the distinct action (generate vs. manage/find) makes usage clear.

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

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