LeadFlow MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LEADFLOW_DB | No | SQLite path, or `:memory:`. | ./data/leadflow.sqlite |
| LEADFLOW_NOW | No | Pins the clock. For demos and tests. Leave it unset on a real desk. | |
| LEADFLOW_SEED | No | `auto` seeds an empty database. `always` wipes and reseeds (Node only; the Worker ignores it). `never` leaves it empty. | auto |
| LEADFLOW_HTTP_HOST | No | Bind address. Any non-loopback host requires `LEADFLOW_AUTH_TOKEN`. | 127.0.0.1 |
| LEADFLOW_HTTP_PORT | No | HTTP port. `0` picks a free port. | 8787 |
| LEADFLOW_LOG_LEVEL | No | Log level: `debug`, `info`, `warn`, or `error`. JSON lines on stderr. | info |
| LEADFLOW_AUTH_TOKEN | No | Bearer token, at least 16 characters. Required off loopback and on the Worker. | |
| LEADFLOW_STALE_DAYS | No | Quiet-open-lead window, 1–90. | 7 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_leadA | Add a lead to the shop pipeline. Money is integer cents (480000 = $4,800.00), never dollars. Pass an idempotencyKey when retrying so a duplicate submit returns the original lead. A reused key with a different payload is a conflict. The response includes the rule-based priority score. |
| update_leadA | Change fields on one lead. Send only the fields that change. Pass expectedUpdatedAt from the last read to reject a stale write. Null clears phone, email, city, or notes. Money stays in integer cents. |
| get_leadA | Read one lead with its priority score, interactions, and follow-ups. Use this before drafting outreach so the reply stays inside the recorded facts. |
| search_leadsA | Search the pipeline. Text matches name, service, city, email, phone, and notes, case-insensitive for ASCII. Results are ranked inside the 500 most recently updated matches. When truncated is true, narrow the query. Scores are computed, not stored. |
| score_leadA | Explain the priority score for one lead. The score is a published sum of source, reachability, urgency, value, stage, and recency, then a cap. It is not persisted and it does not call a model. Read leadflow://scoring-model for the rubric. |
| log_interactionA | Record a call, email, SMS, visit, or note on a lead. Summary should be the facts of the conversation, not a guess. Pass an idempotencyKey on retry. Omitting occurredAt stamps the server clock, and that default is not part of the idempotency hash. |
| schedule_follow_upA | Schedule a follow-up for a lead. dueAt may be in the past, which makes it due immediately. Pass an idempotencyKey on retry. |
| set_follow_up_statusA | Mark a follow-up scheduled, done, or cancelled. Setting the same status again is safe. Done and cancelled items drop out of list_due_follow_ups. |
| list_due_follow_upsA | List scheduled follow-ups whose dueAt is at or before asOf (default: server clock). Ordered soonest first. This is the front desk call list. |
| pipeline_summaryB | Counts by stage, open pipeline value in cents, win rate among closed leads (won / (won + lost)), and open leads with no activity for staleAfterDays (default 7). Win rate is null when nothing has closed. |
| export_leads_csvA | Export leads as CSV text. Cells that start with =, +, -, or @ are prefixed with an apostrophe so a spreadsheet will not treat them as formulas. Quotes and newlines are escaped. The export caps at 5000 rows and sets truncated when that happens. Money is integer cents. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| daily_follow_up_briefing | Build a front-desk briefing from the live pipeline and the follow-ups that are due. The model must not invent prices, times, or promises. |
| draft_follow_up | Draft a follow-up for one lead from the recorded facts. The model must not invent discounts or appointment times. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| pipeline | Stage counts, win rate, open value, and stale leads as JSON. |
| scoring_model | The published point rubric used by score_lead. No model is called. |
| Ellis Ward | new · Kitchen sink leak |
| Quinn Harper | proposal · Sewer scope and cleanout |
| Jonah Feldman | proposal · Primary bathroom remodel |
| Marina Cho | proposal · Tankless water heater install |
| Luis Ortega | new · No hot water |
| Priya Nandakumar | contacted · Main line clog |
| Helen Okonkwo | won · Sump pump replacement |
| Rowan Blake | qualified · Outdoor faucet winterize |
| Chris Dalton | lost · Whole-house repipe quote |
| Samira Adeyemi | contacted · Water heater flush |
TDQS
Scored across 11 tools
Each tool has a distinct resource+action target: lead CRUD (create/update/get/search), scoring explanation, interaction logging, follow-up scheduling/status/listing, summary, and export. The only near-overlap is get_lead (which returns a score) and score_lead (which explains it), but the descriptions make the split explicit — retrieve vs. explain. No two tools appear to do the same thing.
Nearly all tools follow a snake_case verb_noun pattern (create_lead, search_leads, set_follow_up_status, export_leads_csv). The one deviation is pipeline_summary, which is noun-only with no verb. Minor but noticeable inconsistency in an otherwise predictable scheme.
11 tools is well within the 3-15 sweet spot and each maps to a real workflow step (intake, edit, lookup, search, scoring, interactions, follow-ups, reporting, export). Nothing looks redundant or padding.
The surface covers the lead lifecycle well: create, read, update, search, score, interact, follow-up, summarize, export. Gaps: there is no delete_lead or delete/void interaction, and no direct tool to list a lead's follow-ups independently (only set status on an existing one). These are workable around but represent real dead ends for cleanup workflows.