Skip to main content
Glama

Create or update a contact

upsert_contact
DestructiveIdempotent

Create a CRM contact, or update it if one already exists for the email. This is how you "save a lead" — email is the only required field. Tags are merged (never replaced), notes are appended, and events are emitted so automations can fire.

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": {
      "email": "<email>"
    },
    "name": "upsert_contact"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoTags to merge onto the contact.
emailYesContact email (required — the upsert key).
notesNoNote text appended to the contact timeline.
phoneNoPhone number, ideally E.164.
sourceNoLead source label, e.g. "grokbot", "landing-page".
companyNoCompany name.
last_nameNoLast name.
lifecycleNoLifecycle to set.
first_nameNoFirst name.
pipeline_stageNoStage name — must match a stage from list_pipeline_stages.

Output Schema

NameRequiredDescriptionDefault
okNo
errorNoPresent only when ok is false.
eventsNo
createdNo
contact_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds meaningful behavior beyond annotations: tags are merged and never replaced, notes are appended, and events fire automations. Given destructiveHint=true, it should also state which fields are overwritten on an existing contact (e.g., lifecycle, pipeline_stage), which is the one material gap.

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?

Two tight sentences, front-loaded with the core upsert action and its key. Every clause (required field, merge behavior, append behavior, event emission) carries useful information with no filler.

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?

Covers the essential semantics for a 10-parameter upsert: required key, merge vs. replace behavior for tags and notes, and automation side effects. The remaining gap is update-overwrite behavior for other fields, which matters given the destructive annotation.

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 description coverage is 100%, so the schema already documents all ten parameters including tags merge, notes append, and email as the upsert key. The description restates several of these points but adds no syntax or format detail beyond the schema.

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?

States a specific verb and resource ('Create a CRM contact, or update it') plus the exact matching key (email). The 'save a lead' phrasing and the merge/append semantics distinguish it from sibling tools like update_contact and find_contact.

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?

Gives clear context for use: saving a lead where an existing record may or may not exist, keyed on email. It does not explicitly say when to prefer update_contact or find_contact instead, but the upsert framing makes the primary use case unambiguous.

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