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. Changed2 schema fields changed
    • changedInput schema / properties / email / description
      Previous value: -"Contact email (required — the upsert key)."New value: +"Contact email (required, the upsert key)."
    • changedInput schema / properties / pipeline_stage / description
      Previous value: -"Stage name — must match a stage from list_pipeline_stages."New value: +"Stage name: must match a stage from list_pipeline_stages."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=true, and the description adds genuinely new semantics: tags are merged rather than replaced, notes are appended, and events are emitted that can trigger automations — side effects the annotations do not convey. It does not disclose whether non-list fields (company, phone, lifecycle) overwrite existing values on an update, which is the main remaining gap given destructiveHint=true.

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?

Three short sentences, front-loaded with the upsert contract, followed by the practical usage hook and then the merge/append/event semantics. Every sentence carries distinct information and nothing is repeated from the schema verbatim.

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?

With a fully documented 10-parameter schema, an output schema, and rich annotations, the description covers purpose, minimal call shape, and side-effect behavior adequately. The one omission that matters for a destructive-flagged upsert is whether existing field values get overwritten when email already exists.

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 every parameter including the enum and the pipeline_stage/list_pipeline_stages constraint is already documented in the schema. The description reinforces only the required-field fact ('email is the only required field') and adds no format, ordering, or conflict semantics beyond that, so baseline 3 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 names the verb and resource precisely and defines the upsert key ('Create a CRM contact, or update it if one already exists for the email'), which makes the create-vs-update behavior explicit in one clause. It does not name the sibling update_contact or explain when that narrower tool would be preferred, so differentiation is implied rather than stated.

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 a clear intent mapping ('This is how you "save a lead"') and states the minimum viable call ('email is the only required field'), so an agent knows it can call with just an email. It stops short of explicit exclusions or routing to alternatives like update_contact or find_contact.

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