Skip to main content
Glama

Lead Pipeline — Get Scoring Script (large pipelines)

lead_pipeline_get_engine
Read-only

For pipelines LARGER than 500 lead rows. Returns a complete, runnable Python script that loads the lead export in your sandbox and scores it locally (conversion probabilities, money layer, Shapley attribution, CALL / NURTURE / VERIFY queue). Makes no network calls — same shape as Customer Tiering — so Copilot Studio works even when outbound POST is blocked. The rows never pass through you as tokens. Needs numpy. Prints ranked decisions and headline figures; writes the full per-lead ledger to lead_pipeline_result.json. SAVE AND RUN THE RETURNED SCRIPT VERBATIM — do not retype, shorten, reformat, or reimplement it; only PATH / TOUCHES / STAGE_HISTORY / AS_OF / CURRENCY / OUT may be edited. Optionally takes touches_path and stage_history_path for engagement and funnel history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNoAnalysis date YYYY-MM-DD. Defaults to latest in file.
currencyNoISO currency code for display (INR, USD, EUR...).USD
file_pathYesPath to the lead export (CSV/TSV/JSON) inside your sandbox. Needs lead_id + created_date per row; optional stage, status, closed_date, deal_size, source.
touches_pathNoOptional path to a touch / activity log (lead_id, date, optional channel).
stage_history_pathNoOptional path to stage-change history (lead_id, date, stage).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNo
scriptYesThe runnable scoring script.
currencyNo
languageNo
requiresNo
writes_fileNo
instructionsYes
code_integrityYes
engine_versionYes
file_path_usedNo
scipy_requiredNo
data_requirementsNo
touches_path_usedNo
network_access_requiredNo
stage_history_path_usedNo

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses that the tool makes no network calls, does not pass rows as tokens, requires numpy, writes to lead_pipeline_result.json, and must be run verbatim. This adds substantial context beyond the annotations (readOnlyHint=true, openWorldHint=true), covering side effects and operational requirements.

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 longer than ideal, but each sentence carries important operational detail (size threshold, network behavior, verbatim instruction, file output). It is well-structured and front-loaded with the key use case, though could be tightened by removing the repetition about row tokens.

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, the description is remarkably complete: it covers the purpose, output artifacts, constraints, dependencies, and exact usage instructions. The presence of an output schema means return values need no further explanation, and the description covers everything else an agent would need.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining which parameters are safe to edit (PATH, TOUCHES, STAGE_HISTORY, AS_OF, CURRENCY, OUT) and noting that touches_path and stage_history_path are optional for engagement and funnel history, reinforcing schema semantics.

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 clearly states the tool returns a runnable Python script for scoring large lead pipelines, with specific output (conversion probabilities, money layer, Shapley attribution, queue). It explicitly distinguishes itself from the sibling tool by targeting pipelines larger than 500 rows.

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?

The description opens with the explicit condition 'For pipelines LARGER than 500 lead rows,' and notes it is useful when outbound POST is blocked. This gives clear when-to-use guidance and implies the sibling handles smaller pipelines, though it doesn't name the sibling directly.

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