Skip to main content
Glama

upsert_contact

Destructive

Create or update a contact. Upsert keyed by (channel, platform_user_id). 201 when created, 200 when an existing contact was updated. Fields you omit on an existing contact are left untouched, tags included.

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

Input Schema

NameRequiredDescriptionDefault
nameNo
tagsNoTag names, created if missing.
emailNo
notesNo
phoneNo
stageNo
channelYes
custom_fieldsNo
platform_user_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Adds real value beyond the annotations: merge semantics ('fields you omit on an existing contact are left untouched, tags included') and response codes (201 vs 200) tell the agent exactly what state results from a partial payload. Annotations only flag it as destructive and non-idempotent; the description explains the actual write behavior. It still omits permission requirements and whether custom_fields merges or replaces.

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 action and the key, then the response codes, then the merge caveat. Every sentence carries distinct information with no repetition of the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive 9-parameter mutation with no output schema and near-zero schema documentation, the description covers identity, partial-update behavior and status codes, which is the core. Gaps remain around custom_fields merge semantics, whether tags append or replace, and any entitlement/permission constraints on writing contacts.

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 very low (11%), so the description must compensate. It does add the key semantics for channel/platform_user_id and the partial-update rule affecting all omitted fields, but individual parameters (stage, custom_fields, phone, email, notes) get no meaning beyond their types and enums.

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 and resource ('Create or update a contact') plus the upsert key '(channel, platform_user_id)', which is the crucial detail separating it from update_contact. It stops short of naming that sibling outright, but the key-based identity makes the distinction inferable.

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

Usage Guidelines3/5

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

The description implies when to use it (when you have channel + platform_user_id rather than a contact id), but never explicitly says 'use update_contact when you already know the contact id' or warns against using it for lookups. Usage is implied rather than stated.

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