Skip to main content
Glama

CallMCP — Phone Call MCP Server

Create or Update Lead

upsert_lead
Destructive

Create a new lead or update existing leads for the authenticated business, routed through the governed leads API (business access-checked, usage-logged, and audited). To create one, pass lead with at least one of name/phone/email plus optional status/source/notes/agent_id/etc. To update, pass updates: an array of { id, ...fields } for one or many existing leads (status, name, phone, email, notes, address, city, state, zip). Updates are access-checked per row and report partial success.

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": "upsert_lead"
  }
}

Input Schema

NameRequiredDescriptionDefault
leadNoFields for a NEW lead: name, first_name, last_name, phone, email, status, source, notes, address, city, state, zip, agent_id, message. At least one of name/phone/email is required.
updatesNoUpdate existing leads. Each item is { id, ...fields } where fields are a subset of name, first_name, last_name, email, phone, status, source, notes, address, city, state, zip, timezone. Set timezone (IANA, e.g. America/New_York) when the person lives somewhere other than their area code suggests: quiet hours for texts to them follow it. Max 100 per call.
business_idNoBusiness ID. Required for create when the API key can access multiple businesses.

Output Schema

NameRequiredDescriptionDefault
leadNo
errorNoPresent when success is false
failedNo
resultsNo
successYesWhether the tool completed successfully
updatedNo
operationNocreate or update

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / updates / description
      Previous value: -"Update existing leads. Each item is { id, ...fields } where fields are a subset of name, first_name, last_name, email, phone, status, source, notes, address, city, state, zip. Max 100 per call."New value: +"Update existing leads. Each item is { id, ...fields } where fields are a subset of name, first_name, last_name, email, phone, status, source, notes, address, city, state, zip, timezone. Set timezone (IANA, e.g. America/New_York) when the person lives somewhere other than their area code suggests: quiet hours for texts to them follow it. Max 100 per call."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond annotations, the description discloses that the tool routes through a governed API that is business access-checked, usage-logged, and audited, and that updates are access-checked per row and report partial success. It does not explicitly state what data a destructive update overwrites, but the partial-success and per-row access-check details add meaningful behavioral context.

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 four sentences, front-loaded with purpose and then the two operational modes. Wording is generally efficient, though the parenthetical about the governed API is slightly verbose. Every sentence contributes useful information, and the structure is easy to follow.

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 3-parameter tool with nested update objects and an output schema, the definition covers create/update routing, per-row access checks, and partial success. The schema handles business_id and detailed field descriptions, and the output schema means return values need not be explained. The definition is nearly complete for an agent to invoke it correctly.

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?

Even with 100% schema coverage, the description adds meaning by explaining how the parameters map to create vs update modes: `lead` for new records and `updates` as an array of { id, ...fields } for existing leads. It synthesizes field requirements and the multi-row update shape, going slightly beyond the schema's own summaries.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Create a new lead or update existing leads for the authenticated business.' It clearly distinguishes create vs update modes. However, it does not explicitly differentiate from sibling tools like get_lead or rate_lsa_lead, relying on the tool name and context for that separation.

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 provides clear usage context by explaining that creating requires passing `lead` with at least one of name/phone/email, and updating requires passing `updates` with an array of { id, ...fields }. No when-not-to-use conditions or explicit alternatives are named, but the mode-based guidance is strong.

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.