Skip to main content
Glama

Create a lead

create_lead

Create a lead

The lead starts in the agent's starting status (new unless your team chose another), unassigned. phone, when sent, must be a valid number in E.164 (+201001234567); the lead is linked to the agent's contact with that number, or to a new contact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
phoneNoA valid number in E.164 (`+201001234567`); the lead links to the agent's contact with that number. An empty string is the same as leaving it out.
summaryNo
agent_idYesThe agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`.
custom_fieldsNoFree-form fields keyed by name, stored as sent (see Partial updates in the API description for how date-time strings and decimals are normalized). For a lead, use the keys of the agent's own lead fields (`listLeadFields`, `built_in: false`), and the whole object is limited to about 10,000 characters of JSON (`422 invalid_request` beyond). Mojeeb doesn't check keys or values against the fields' `type`, `options` or `required`. On update the object merges key by key, and a key sent as `null` stays with the value `null`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already establish that this is a non-idempotent, non-destructive write. The description adds genuinely useful behavioral context beyond them: the lead starts in the agent's configured starting status (`new` by default) and is unassigned, and how `phone` triggers contact linking.

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?

Front-loaded with the verb+resource, then two tight sentences on starting status and phone handling. No filler or redundancy.

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 mutation tool with no output schema, the description covers the key non-obvious behaviors (default status, unassigned state, phone-to-contact linkage). It omits the custom_fields normalization/limit details, which the schema does carry.

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 60%, with the schema itself documenting `phone`, `agent_id` error cases, and `custom_fields`. The description reinforces the `phone` E.164 format and linking behavior, but adds nothing about `name`, `summary`, or the custom_fields limits, so it does not fully compensate for the coverage gap.

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?

States a specific verb (Create) and resource (a lead), which is clearly distinguishable from siblings like update_lead or create_contact_note. It does not explicitly name an alternative to differentiate against, but the create/update split is self-evident from the name.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives such as update_lead, nor any stated prerequisites beyond the implicit need for an agent_id. The description describes post-conditions rather than when-to-use conditions.

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