Skip to main content
Glama

Synthesize lead hypothesis

synthesize_lead_hypothesis
Destructive

Given a lead journey (from query_lead_journey), produce a structured hypothesis: intent score, conversion-failure mode, suggested outreach angle, and notes for drafting. Writes the synthesis back to leads.synopsis_jsonb so the Leads tab UI sees it. Use this after journey reconstruction, before draft_outreach.

[write-tier — first use may require a manager's approval; a from-now-on approval makes future calls seamless, a just-once approval re-asks next time. Call it on the first clear ask; the card is the yes — do not re-ask in chat.]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lead_idYesUUID of the lead. Used to persist synthesis back to leads.synopsis_jsonb.
companyIdYesFreedomOS company id to act within (you must be a member). Required for company-scoped tools.
journey_jsonYesJSON-encoded journey object returned by query_lead_journey. Caller should JSON.stringify the journey output before passing.
company_contextNoOptional short summary of the company the lead arrived at (e.g., 'Acme Health — pharmacy compounding compliance consulting for US pharmacies'). Helps the model evaluate fit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / company_context / description
      Previous value: -"Optional short summary of the company the lead arrived at (e.g., 'Conduit — pharmacy compounding consulting for US pharmacies'). Helps the model evaluate fit."New value: +"Optional short summary of the company the lead arrived at (e.g., 'Acme Health — pharmacy compounding compliance consulting for US pharmacies'). Helps the model evaluate fit."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false and destructiveHint=true, and the description does not contradict them. It adds useful behavior beyond annotations: the write-tier approval semantics (from-now-on vs just-once, first-clear-ask behavior) and the side effect that the UI updates leads.synopsis_jsonb so the UI reflects it. This is meaningful behavioral context beyond the structured annotations.

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 compact and front-loaded: purpose first, persist effect second, workflow position third, approval behavior last. The approval note is a bit dense but still earns its place because it changes how an agent should handle the call. No filler.

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

Completeness4/5

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

For a write tool with no output schema, the description covers inputs, expected output fields, side-effect location, workflow position, and approval behavior. It could say more about return values, but the workflow position and annotations cover the essential safety profile well enough.

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?

Schema description coverage is 100% and already documents lead_id persistence, companyId scoping, journey_json stringify requirement, and company_context's purpose. The description reinforces the journey_json source and sequence but adds no material parameter meaning beyond what the schema provides. 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 names a specific verb and resource: synthesize a structured lead hypothesis from a lead journey and persist it to leads.synopsis_jsonb. It also defines the exact output components (intent score, conversion-failure mode, outreach angle, notes) and positions it relative to query_lead_journey and draft_outreach, distinguishing it from nearby workflow siblings.

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

Usage Guidelines4/5

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

It gives explicit sequencing context: use after journey reconstruction and before draft_outreach. It also adds approval-UI guidance about when to call and not re-ask. It does not name exclusions, but the workflow ordering and approval behavior provide clear actionable guidance.

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.

Resources