Skip to main content
Glama
gomessoaresemmanuel-cpu

linkedin-prospection-mcp

run_pipeline

Automate LinkedIn prospection by finding leads, sending invitations, checking acceptances, and sending direct messages. Skip lead search or simulate actions as needed.

Instructions

Trigger the full daily prospection pipeline: find leads → send invitations → check acceptances → send DMs. Uses the daily-orchestrator.js script. Can skip lead search with skip_leads=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skip_leadsNoSkip lead search (invitations + DMs only)
dry_runNoSimulate without sending

Implementation Reference

  • The implementation of the run_pipeline tool handler which executes the daily-orchestrator.js script.
    server.registerTool(
      "run_pipeline",
      {
        title: "Run Prospection Pipeline",
        description:
          "Trigger the full daily prospection pipeline: find leads → send invitations → check acceptances → send DMs. " +
          "Uses the daily-orchestrator.js script. Can skip lead search with skip_leads=true.",
        inputSchema: {
          skip_leads: z.boolean().default(true).optional().describe("Skip lead search (invitations + DMs only)"),
          dry_run: z.boolean().default(false).optional().describe("Simulate without sending"),
        },
        annotations: { readOnlyHint: false, openWorldHint: true, destructiveHint: false },
      },
      async ({ skip_leads, dry_run }) => {
        if (!fs.existsSync(SESSION_DIR)) {
          return {
            isError: true,
            content: [{ type: "text" as const, text: "LinkedIn session expired. Run setup-session.js to re-login." }],
          };
        }
    
        const args: string[] = [];
        if (skip_leads) args.push("--skip-leads");
        if (dry_run) args.push("--dry-run");
    
        const result = await runScript("daily-orchestrator.js", args, 600_000);
    
        return {
          content: [
            {
              type: "text" as const,
              text: [
                result.code === 0 ? "Pipeline completed successfully!" : `Pipeline finished with code ${result.code}`,
                "",
                result.stdout.slice(-3000),
                result.stderr ? `\nErrors:\n${result.stderr.slice(-500)}` : "",
              ].join("\n"),
            },
          ],
        };
      },
    );

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