Skip to main content
Glama

Add or edit a customer

save_customer
Destructive

Create or edit a customer (client/contact) in an organization, as the CRM form in the app does. Without customer_id this creates one: name is required. With customer_id (from list_customers) it edits that customer: pass just the fields to change — omitted fields are untouched, an explicit empty string clears a text field, a blank name is rejected, and it errors if no field is given. Requires CRM-manager access. Returns the customer; verify edits with list_customers. With decision_maker_id (from list_leads source=business_directory) it saves a directory lead instead: it unlocks that person's work email — only an email at the business's own domain from a confident match, and a found email uses one of the organization's monthly unlocks (Team: 100; not_found and repeat unlocks are free) — then creates a customer for the business with that email, its website, and a note naming the person and their title; name and notes override the defaults. Returns {decision_maker, unlocks, customer}; 403 PLAN_LIMIT_REACHED when the month's unlocks are used. Team plan and above. Confirmation-gated only when decision_maker_id is set. A plain customer create or edit applies on the first call, including an edit that overwrites or clears a field; no customer save emails anyone.

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_customer"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNocustomer name; required when creating, never blank
emailNocontact email
notesNonotes about the customer
phoneNocontact phone number
statusNoorg's status label for this customer
addressNofree-form address object
websiteNocustomer website url
customer_idNoedit this customer (from list_customers); omit to create one
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
decision_maker_idNosave a directory decision maker (from list_leads source=business_directory) as a new customer
confirmation_tokenNoonly when decision_maker_id is set: leave empty on the first call; the server returns confirmation_required + a token, then resend the SAME args with that token

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: { address, contact_count, email, event_ids, external_identities [{ external_id, external_url, provider, provider_object }], id, linked_events_count, name, next_event { event_date, event_status, id, location, location_name, title, venue_id, venue_name }, notes, phone, primary_contact { email, id, is_primary, name, phone, portal_access, title }, recent_events [{ event_date, event_status, id, location, location_name, title, venue_id, venue_name }], source_summary [{ count, provider, provider_object }], status, venues [{ address, id, name, notes, status }], website } }
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 destructiveHint=true/openWorldHint=true/idempotentHint=false, but the description discloses far more: CRM-manager access is required, blank names are rejected, an empty string clears a text field, omitted fields are untouched, no emails are sent, and the decision_maker path consumes a monthly unlock quota with a 403 PLAN_LIMIT_REACHED outcome. It also explains confirmation gating precisely (only when decision_maker_id is set) and that plain creates/edits apply on the first call, which is exactly the risk context an agent needs for a destructive 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?

The main create/edit contract is front-loaded in the first two sentences, and the mode-specific caveats follow in a logical order. It is a single very dense block of semicolon- and em-dash-chained clauses, though, so the decision-maker/unlock and confirmation details are harder to scan than they need to be.

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 12-parameter, three-mode mutation tool with an output schema, it covers everything an agent needs: prerequisites, per-mode required fields, quota and error codes, confirmation flow, and idempotency retry behavior. Return values are restated briefly rather than relied on, which is redundant with the output schema but not harmful.

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 description clears that bar by adding semantics the schema does not carry: omitted-versus-empty-string behavior on edits, name required only on create, name/notes overriding the decision-maker defaults, and the idempotency contract on retries. It does not re-explain every field (status, address, phone), so it is strong but not exhaustive.

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?

Opens with a specific verb pair and resource ("Create or edit a customer (client/contact) in an organization") and then splits the tool into three distinguishable modes keyed on customer_id and decision_maker_id. An agent can tell it apart from list_customers and save_lead without opening any 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?

Explicitly states when to omit customer_id (create) versus pass it (edit), names list_customers as the source of ids, names list_leads source=business_directory as the source of decision_maker_id, and says to verify edits with list_customers. It also states the failure condition (errors if no field is given) and the plan requirement (Team plan and above), leaving nothing to inference.

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.