Skip to main content
Glama

Upsert contact

upsert_contact
Destructive

Create a contact, or update the existing one with the same phone_number.

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

Input Schema

NameRequiredDescriptionDefault
nameNoDisplay name. Defaults to first + last name.
tagsNoLabels that group contacts
emailNoEmail address
notesNoFree-text notes
stateNoUS state or Canadian province, usually a 2-letter code
fieldsNoUp to 20 string values (account id, plan, location...), usable in segments and as {{field:key}} merge fields
opt_inNoImport only (POST /v1/contacts/import). Stored as consent evidence; never lifts an opt-out.
sourceNoWhere the contact came from. Defaults to "api".
companyNoCompany name
last_nameNoLast name
first_nameNoFirst name
phone_numberYesE.164, US or Canada

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / company / description
      Added value: +"Company name"
    • addedInput schema / properties / email / description
      Added value: +"Email address"
    • addedInput schema / properties / first_name / description
      Added value: +"First name"
    • addedInput schema / properties / last_name / description
      Added value: +"Last name"
    • addedInput schema / properties / notes / description
      Added value: +"Free-text notes"
    • addedInput schema / properties / state / description
      Added value: +"US state or Canadian province, usually a 2-letter code"
    • addedInput schema / properties / tags / description
      Added value: +"Labels that group contacts"
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and non-read-only, so the safety profile is partly covered. The description adds the phone-number matching rule, but does not explain which existing fields are overwritten or how omitted fields are treated on update—important context for a destructive upsert.

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?

A single front-loaded sentence with no filler; the core upsert rule is stated immediately. It is efficient, though quite sparse for a 12-parameter mutation tool.

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 12-parameter upsert, the description gives only the create/update key rule and omits merge-vs-replace semantics, treatment of omitted fields, and any result indication. With the rich schema and annotations it is minimally sufficient to attempt a call, but not complete enough to predict the impact of an update.

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 12 parameters and nested opt_in details. The description adds only that phone_number is the match key; it does not clarify update behavior for the other optional fields or the confusing import-only opt_in parameter.

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?

Names a specific operation (create-or-update a contact) and the key that determines the branch (same phone_number). It is clear what the tool does, but it does not contrast with sibling tools such as update_contact or import_contacts, so it falls short of full sibling differentiation.

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 using this tool when a contact may or may not already exist, since it creates or updates by phone. It gives no explicit when-to-use/when-not guidance or alternative such as update_contact for known existing contacts, leaving routing 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.