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. 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. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=false), the description discloses real runtime behavior: business access-checking, usage logging and auditing, per-row access checks on updates, and partial-success reporting. It does not explain merge semantics (whether omitted fields are cleared) or how partial failures are returned, which matters for a destructive, non-idempotent write.

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?

Three tight sentences, front-loaded with the create/update split and then the mechanics for each. The parenthetical governance clause is mild filler but short enough to earn its place as behavioral context.

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 nested-object tool with an output schema, the description covers both operating modes, required inputs, batch limits are in the schema, and it signals partial-success returns. It leaves open the per-field update semantics and error shape, but little an agent needs to invoke it correctly is missing.

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 coverage is 100%, so the schema already documents all three parameters, including the required name/phone/email rule, the 100-item cap, and the business_id condition. The description largely restates those field lists rather than adding new semantics, so the baseline applies.

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 opens with a specific verb pair and resource — "Create a new lead or update existing leads for the authenticated business" — and immediately splits the two modes. It makes clear this is a write/upsert tool distinct from a read tool like get_lead, though it never names a sibling explicitly.

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 routing guidance between the tool's two modes: pass `lead` to create, pass `updates` to update, with the minimum required fields for each. It stops short of saying when to prefer this tool over other write paths (e.g. agent/campaign tools) or when not to call it.

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.