Skip to main content
Glama
gomessoaresemmanuel-cpu

linkedin-prospection-mcp

Qualify Leads (Batch)

qualify_leads
Read-only

Score and qualify LinkedIn leads using rule-based criteria for fit, intent, and urgency to identify promising prospects.

Instructions

Score and qualify all unscored leads from the latest search. Uses the rule-based scoring engine (fit + intent + urgency).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax leads to score

Implementation Reference

  • The handler logic for the qualify_leads tool, which scores leads using a rule-based engine and returns a summary report.
    async ({ limit }) => {
      const leadsData = getLeads() as { leads?: LeadInput[] };
      const leads = leadsData.leads || [];
    
      if (leads.length === 0) {
        return { content: [{ type: "text" as const, text: "No leads found. Run find_leads first." }] };
      }
    
      const maxLeads = limit ?? 50;
      const toScore = leads.slice(0, maxLeads);
      const scored = toScore.map(scoreLead);
    
      const p1 = scored.filter((l) => l.priority === "P1-hot");
      const p2 = scored.filter((l) => l.priority === "P2-warm");
      const p3 = scored.filter((l) => l.priority === "P3-nurture");
      const p4 = scored.filter((l) => l.priority === "P4-cold");
    
      const lines = [
        `Qualified ${scored.length} leads:`,
        `  P1-hot: ${p1.length}`,
        `  P2-warm: ${p2.length}`,
        `  P3-nurture: ${p3.length}`,
        `  P4-cold: ${p4.length}`,
        "",
      ];
    
      if (p1.length > 0) {
        lines.push("--- P1 HOT LEADS ---");
        p1.forEach((l) => {
          lines.push(`  ${l.name} (${l.total_score}/100) — ${l.title || "?"} — ${l.reasoning}`);
        });
        lines.push("");
      }
    
      if (p2.length > 0) {
        lines.push("--- P2 WARM LEADS ---");
        p2.forEach((l) => {
          lines.push(`  ${l.name} (${l.total_score}/100) — ${l.title || "?"} — ${l.reasoning}`);
        });
      }
    
      return { content: [{ type: "text" as const, text: lines.join("\n") }] };
    },
  • The input schema for the qualify_leads tool, defining the optional limit for batch processing.
    inputSchema: {
      limit: z.number().min(1).max(100).default(50).optional().describe("Max leads to score"),
    },
  • src/index.ts:342-353 (registration)
    The registration of the qualify_leads tool within the MCP server configuration.
    server.registerTool(
      "qualify_leads",
      {
        title: "Qualify Leads (Batch)",
        description:
          "Score and qualify all unscored leads from the latest search. " +
          "Uses the rule-based scoring engine (fit + intent + urgency).",
        inputSchema: {
          limit: z.number().min(1).max(100).default(50).optional().describe("Max leads to score"),
        },
        annotations: { readOnlyHint: true, openWorldHint: false, destructiveHint: false },
      },
Behavior3/5

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

Annotations already establish this as read-only and non-destructive. The description adds valuable behavioral context by specifying the scoring algorithm components (fit/intent/urgency) and scope limitation (only unscored leads). However, it fails to clarify what 'qualify' entails regarding data persistence—whether scores are returned in the response, saved to the leads, or how the results should be interpreted.

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?

The description consists of two highly efficient sentences with zero waste. The first sentence front-loads the core action and scope (batch processing of unscored leads from latest search), while the second provides specific methodology detail. Every word earns its place.

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

Completeness3/5

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

For a single-parameter tool with good schema coverage, the description adequately covers the business logic (scoring methodology) and data scope. However, given the lack of an output schema, the description should specify what the tool returns (e.g., scored lead data, qualification status) or how the results are delivered, which would help the agent understand how to use the output in subsequent steps.

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?

With 100% schema description coverage for the 'limit' parameter ('Max leads to score'), the schema adequately documents the single input. The description mentions 'all unscored leads' without acknowledging the limit constraint, creating slight ambiguity about whether the tool truly processes all leads or respects the maximum. Baseline 3 is appropriate given the schema carries the documentation burden.

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?

The description uses specific verbs ('Score and qualify') and clearly identifies the resource ('unscored leads from the latest search'). It effectively distinguishes this tool from the sibling 'score_lead' by emphasizing the batch nature ('all unscored leads') and the specific data source ('latest search'), while also detailing the methodology ('rule-based scoring engine' with 'fit + intent + urgency' components).

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

Usage Guidelines3/5

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

The description implies a workflow dependency by referencing 'the latest search', hinting that this tool processes results from a prior search operation (likely 'find_leads'). However, it lacks explicit guidance on prerequisites, does not clarify when to use this batch tool versus the single-lead 'score_lead' alternative, and omits 'when-not-to-use' guidance.

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