Skip to main content
Glama

Score Lead Pipeline

lead_pipeline
Read-only

Scores an open sales pipeline of 500 lead rows OR FEWER into conversion probabilities, money at risk / value of contact, funnel stage outlook, multi-touch Shapley attribution, and a daily CALL / NURTURE / VERIFY queue. Send the rows directly; this server scores them and returns the full result including the per-lead ledger. For pipelines LARGER than 500 leads use lead_pipeline_get_engine instead — sending thousands of rows as tool arguments is slow and risks truncated JSON. Needs lead rows (lead_id, created_date; optional stage, status, closed_date, deal_size, source) from CSV, Salesforce, HubSpot, or any CRM. Optional touches and stage_history improve uplift learning, Markov funnel, and attribution. Returns manager decisions (CALL TODAY / PUSH FORWARD / QUALIFY), call queue, pipeline exposure headline, per-lead money, and explanation traces. Do not invent scores — call this tool when lead data is available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNoAnalysis date YYYY-MM-DD.
leadsYesRaw lead rows. Each item needs lead_id and created_date.
touchesNoOptional touch log [{lead_id, date, channel}, ...].
currencyNoISO currency code for money display. No FX conversion.USD
horizon_daysNoWindow for P(convert) and expected days-to-convert.
stage_historyNoOptional stage log [{lead_id, date, stage}, ...].
call_queue_sizeNoMax length of the daily call queue.
currency_symbolNoOverride display symbol (e.g. ₹, $).
cold_threshold_daysNoDays of silence before a lead counts as going cold.
include_diagnosticsNoIf true, include Cox/logistic fit diagnostics.
annual_discount_rateNoAnnual discount rate for pipeline value.
min_closed_for_modelNoBelow this, Cox / Shapley refuse to fit.
shapley_max_channelsNoTop N−1 channels kept for exact Shapley.
contact_effectivenessNoFallback uplift when learned data is too thin.
min_conversions_for_modelNoBelow this, Cox refuses.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
leadsYesList from the upstream lead pipeline API.
alertsNoList from the upstream lead pipeline API.
statusYes1 = success, 0 = error
messageNo
metadataNoUpstream lead pipeline API payload.
decisionsYesRanked plain-language manager cards (CALL TODAY / PUSH FORWARD / QUALIFY). Money, days, lead names only — no Cox / survival / Shapley jargon.
call_queueYes
attributionNo
funnel_modelNo
survival_modelNo
pipeline_summaryNoUpstream lead pipeline API payload.
money_assumptionsNo
pipeline_exposureNo
data_quality_reportNoUpstream lead pipeline API payload.

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, non-destructive behavior, and the description adds substantial context beyond that: the hard size limit and its rationale, the fact that rows are sent directly and scored server-side with the full result returned, the optional touches/stage_history improving model quality, and the 'do not invent scores' constraint. This gives the agent clear operational expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and front-loaded with purpose, then size constraints, data requirements, and return outputs. It is longer than average but the tool is complex with 15 parameters; however, it slightly repeats the 500-lead limit across two sentences and could be trimmed without losing meaning.

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

Completeness5/5

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

Given the tool's complexity (15 params) and the presence of an output schema, the description provides the essential context: data prerequisites, size limit with alternative tool, optional inputs that improve quality, and a summary of returned artifacts. It explains when not to use it and what behavior to expect, making it complete for an agent.

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?

Input schema coverage is 100%, so parameters are already well-documented. The description adds minor semantic value by naming the essential lead fields (lead_id, created_date) and noting that touches and stage_history improve attribution, but it largely repeats schema information. Baseline 3 is appropriate.

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 opens with a specific verb 'Scores' and names the exact resource ('open sales pipeline of 500 lead rows OR FEWER'), followed by the concrete outputs: conversion probabilities, money at risk, funnel stage outlook, Shapley attribution, and a CALL/NURTURE/VERIFY queue. It also distinguishes itself from the sibling lead_pipeline_get_engine by explicitly noting the size boundary for direct-row scoring.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance: pipelines ≤500 leads. It names the alternative (`lead_pipeline_get_engine`) for larger pipelines and explains why (slow, truncated JSON). It also states prerequisites (lead rows with lead_id and created_date), compatible data sources, and an explicit instruction not to invent scores when data is unavailable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly defined trigger: lead_pipeline for pipelines of 500 or fewer rows, and lead_pipeline_get_engine for larger pipelines. The descriptions explicitly reference each other and specify the exact size threshold, eliminating any ambiguity about which tool to use.

Naming Consistency3/5

Both tool names share the 'lead_pipeline' prefix, but one is a bare noun phrase while the other appends 'get_engine'. This inconsistency in structure (no verb in 'lead_pipeline' vs. verb_noun in 'lead_pipeline_get_engine') makes the naming pattern slightly unpredictable, though still readable.

Tool Count4/5

With only 2 tools, the server is on the lower end of the typical range, but each tool earns its place by addressing a distinct lead volume scenario. The small count feels reasonable given the narrow, specialized domain.

Completeness5/5

The server covers both direct scoring for standard pipelines and a script-based approach for large datasets, addressing all core lead scoring features (conversion probabilities, money layer, Shapley attribution, call queue). No obvious missing operations exist within its stated purpose.

Resources