Skip to main content
Glama

Convert lead

convert_lead
Destructive

Convert a lead into a customer on a gig and mark the lead Won. It writes three things: the customer, that customer on the gig, and the lead stage. Returns the customer, the event_id and the updated lead. A Won lead cannot be reopened with save_lead, so check the lead and the gig with the user first. Confirmation-gated.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lead_id": "<lead_id>",
      "event_id": "<event_id>"
    },
    "name": "convert_lead"
  }
}

Input Schema

NameRequiredDescriptionDefault
lead_idYesid of the lead to convert, from list_leads
event_idYesthe gig to attach the new customer to, an id from list_events, open_gigs or my_agenda
organization_idNoorganization to act in, an id from get_me; omit to use your active organization
confirmation_tokenNoleave empty on the first call; the server returns confirmation_required + a token, then resend the SAME args with that token to proceed

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: { customer { email, id, name, phone }, event_id, lead { inquiry_date, referred_by, guest_count, budget, company, customer, customer_id, email, and 19 more fields } } }
errorNowhen ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / event_id / description
      Previous value: -"the event to attach the new customer to"New value: +"the gig to attach the new customer to, an id from list_events, open_gigs or my_agenda"
    • addedInput schema / properties / event_id / minLength
      Added value: +1
    • changedInput schema / properties / lead_id / description
      Previous value: -"the lead to convert"New value: +"id of the lead to convert, from list_leads"
    • addedInput schema / properties / lead_id / minLength
      Added value: +1
    • changedInput schema / properties / organization_id / description
      Previous value: -"defaults to your active organization"New value: +"organization to act in, an id from get_me; omit to use your active organization"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / properties / data / description
      Previous value: -"tool payload (API/composite/confirmation object); object, array, or primitive JSON"New value: +"when 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: { customer { email, id, name, phone }, event_id, lead { inquiry_date, referred_by, guest_count, budget, company, customer, customer_id, email, and 19 more fields } } }"
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "description": "tool payload (API/composite/confirmation object); object, array, or primitive JSON"
      +    },
      +    "error": {
      +      "description": "when ok is false",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "true on success (including confirmation_required prompts)",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true, idempotentHint=false and readOnlyHint=false; the description goes well beyond that by naming precisely what gets mutated (customer, customer-on-gig, lead stage), stating the irreversible Won state, and describing the return payload. It also discloses the confirmation gate, which is real behavioral context the annotations do not express.

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

Conciseness5/5

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

Four compact sentences: the action and its side effects first, the return value second, the irreversibility warning third, the gate last. No filler, and the destructive consequence is front-loaded rather than buried.

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 destructive, confirmation-gated mutation with an output schema, this covers what an agent needs: side effects, irreversibility, prerequisite user check, and the two-call flow. Since an output schema exists, the brief return-value sentence is a bonus rather than a requirement.

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 and the schema already documents lead_id, event_id, organization_id and the confirmation_token handshake. The description still adds value by signaling that both the lead and the gig should be user-verified before submission, which tells the agent these two ids are consequential rather than incidental.

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 and resource — 'Convert a lead into a customer on a gig and mark the lead Won' — and immediately enumerates the three writes it performs. It also distinguishes itself from the sibling save_lead, so an agent can place it among the lead tools without opening a schema.

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?

It gives an explicit precondition ('check the lead and the gig with the user first') and names the alternative that cannot undo the action ('A Won lead cannot be reopened with save_lead'), which is exactly the when/when-not/alternative framing an agent needs. The final 'Confirmation-gated' note flags the two-step call pattern up front.

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.