Skip to main content
Glama

Add or edit a lead

save_lead
Destructive

Create a booking/staffing lead in an organization, or change one. Without lead_id this creates a lead: name, event_date, event_type, location, and source (WEBSITE|REFERRAL|INBOUND_EMAIL|PARTNER|REPEAT_CLIENT|INSTAGRAM|FACEBOOK|WEB_SEARCH|OTHER; staff-authored leads must state where they came from) are required; email is optional. When the client has only a month or year, pass event_date_precision MONTH or YEAR with any day in it; the date is stored as the first of the month or January 1. The created lead is returned. The returned lead carries stage (NEW, QUALIFIED, QUOTED, WON, LOST) as its readable position; its numeric status is a legacy field (1 pending, 2 completed) derived from stage. With lead_id it changes that lead as a partial merge: stage may be NEW, QUALIFIED, or QUOTED (use convert_lead to reach Won and mark_lead_lost to reach Lost), and null for event_id or customer_id unlinks. A Lost lead takes no other edit until it is reopened: pass lead_id, reopen=true and stage (NEW, QUALIFIED, or QUOTED) to bring it back into that stage; that call changes only the stage, and a converted (Won) lead cannot be reopened. Who is told: creating a lead emails the lead's own address (when it has one) a confirmation that the request was received and emails the organization a new-lead notice; editing or reopening a lead notifies nobody. Confirmation-gated only when creating; an edit or reopen runs on the first call. organization_id defaults to your active organization; pass it explicitly for a lead in another organization you belong to.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "save_lead"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNocontact name (required when creating)
emailNocontact email
phoneNocontact phone number
stageNowhen changing: NEW, QUALIFIED, or QUOTED
budgetNothe budget the lead gave, kept as free text: an amount or a range (e.g. 5000); no currency is stored with it
reopenNowith lead_id and stage: bring a Lost lead back into that stage; no other field changes
sourceNoWEBSITE, REFERRAL, INBOUND_EMAIL, PARTNER, REPEAT_CLIENT, INSTAGRAM, FACEBOOK, WEB_SEARCH, or OTHER (required when creating)
companyNocompany or client name
lead_idNochange this lead; omit to create one
messageNowhat the lead wrote or said when they got in touch
event_idNowhen changing: link this lead to an event; null clears the link
locationNowhere the client's event takes place: the venue name or city they gave, never a person's home or current location
event_dateNorequested event date (YYYY-MM-DD or RFC3339; required when creating)
event_typeNoevent type (concert, wedding, corporate, festival, …; required when creating)
customer_idNowhen changing: link this lead to a customer; null clears the link
internal_notesNonotes private to the org
idempotency_keyNocreating only: a key you generate (a UUID works) and send with this create. Send the same key to retry the same create after a timeout or lost reply: the server returns the record that call created, read as it is now with your current access, and does not create or notify a second time. If that first call failed with an error that may have left the record created, the key stays blocked (409 IDEMPOTENCY_OUTCOME_UNKNOWN): check whether the record exists before creating it with a new key. Kept for 24 hours per organization, user and tool; reusing a key with different arguments is refused (409 IDEMPOTENCY_KEY_REUSED). Omit it and a repeated call creates a repeat.
organization_idNoorganization to act in, an id from get_me; omit to use your active organization
confirmation_tokenNoonly when creating a lead: leave empty on the first call; the server returns confirmation_required + a token, then resend the SAME args with that token
event_date_precisionNohow much of event_date is known; MONTH or YEAR when the client has no day yet

Output Schema

NameRequiredDescriptionDefault
okYestrue on success (including confirmation_required prompts)
dataNowhen the tool asks first: { status: "confirmation_required", confirmation_token, summary, expires_in_seconds, instructions } and nothing is changed; once confirmed, the API response { status (HTTP status), data: { inquiry_date, referred_by, guest_count, budget, company, customer { email, id, name, phone }, customer_id, email, event_date, event_id, event_type, id, internal_notes, latitude, location, locked, longitude, lost_at, and 9 more fields } }
errorNowhen ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give the generic write/destructive/openWorld profile; the description adds the specific consequences: creating emails the lead a confirmation and the org a new-lead notice, while editing or reopening notifies nobody. It also documents null-as-unlink semantics, the Lost-lead edit freeze, idempotency key lifetime and 409 behaviors, and that edits run on the first call rather than being confirmation-gated.

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 definition is front-loaded with the create-vs-edit distinction before the detail, and every clause is load-bearing (notifications, idempotency, reopen, confirmation). It is a single dense block that repeats the source enum and 'email is optional' already present in the schema, which costs some tightness but not comprehension.

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?

For a 20-parameter dual-mode mutation tool with an output schema, the description covers the things structured fields cannot express: mode selection, required-on-create fields, state machine constraints, notification side effects, confirmation token flow, and idempotency retry semantics. An agent could invoke this correctly from the description plus schema alone.

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 the baseline is 3, but the description adds cross-parameter meaning the schema cannot: which fields are required only on create, why source must be stated for staff-authored leads, how event_date_precision MONTH/YEAR causes the date to be stored as the first of the month or January 1, and that organization_id defaults to the active organization. It does not add much for fields like phone, budget, or internal_notes beyond the schema.

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 opening sentence names a specific verb pair and resource ('Create a booking/staffing lead ... or change one') and immediately splits the two modes by lead_id. It also names the exact siblings that handle the states this tool cannot reach ('use convert_lead to reach Won and mark_lead_lost to reach Lost'), so an agent can distinguish it from convert_lead and mark_lead_lost without opening schemas.

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?

Usage is spelled out per mode: omit lead_id to create, pass lead_id to partial-merge, pass lead_id + reopen + stage to bring back a Lost lead. It explicitly excludes paths (Won goes through convert_lead, Lost through mark_lead_lost, a converted Won lead cannot be reopened) and states the confirmation-gating rule differs between create and edit/reopen.

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.