Skip to main content
Glama

upsert_contact

Idempotent

Create or update a Google Contact by matching email, phone, or exact name; existing contacts are merged, otherwise a new contact is added.

Instructions

Smart add-or-edit Google Contact. Searches for an existing contact by email, phone number, or exact full name; if found, merges/updates the contact, otherwise creates a new contact. Ideal when adding or editing contacts extracted from PNG/JPG images, text, or markup in Claude, ChatGPT, or Gemini.

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": "upsert_contact"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsNoWebsite or profile URLs (strings or { value, type })
mergeNoWhen updating an existing contact, merge emails/phones/notes instead of overwriting all fields (default: true)
notesNoBiography or notes about the contact
emailsNoEmail addresses (strings or { value, type: 'work'|'home'|'other' })
phonesNoPhone numbers (strings or { value, type: 'mobile'|'work'|'home'|'other' })
prefixNoHonorific prefix (e.g. Dr., Mr., Ms.)
suffixNoHonorific suffix (e.g. Jr., III, PhD)
birthdayNoBirthday in YYYY-MM-DD or MM-DD format
fullNameNoFull display name (automatically split if givenName/familyName are omitted)
jobTitleNoJob title or role
nicknameNoNickname
addressesNoPhysical addresses (strings or structured address objects)
givenNameNoFirst / given name
photoPathNoOptional local file path to a PNG/JPG photo to set as the contact's avatar
departmentNoDepartment within the organization
familyNameNoLast / family name
middleNameNoMiddle name
photoBase64NoOptional base64-encoded PNG/JPG photo to set as the contact's avatar
customFieldsNoCustom key-value pairs stored on the contact
organizationNoCompany or organization name
resourceNameNoOptional known Google Contact resourceName (e.g. 'people/c12345')
groupResourceNamesNoContact group resource names (e.g. ['contactGroups/myContacts'])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, openWorldHint=true, and readOnlyHint=false, so safety and idempotency are covered structurally. The description adds real value by disclosing the match keys used to find an existing contact, but it is silent on ambiguous cases (multiple matches), what happens when merge=false overwrites, and any auth prerequisite implied by the authenticate_google sibling.

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?

Three short sentences with the mechanism front-loaded before the usage suggestion, and no repetition of schema fields. The Claude/ChatGPT/Gemini reference is slightly promotional but does convey that input comes from heterogeneous sources.

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 22-parameter mutation tool with no output schema, the description explains the core upsert logic well but leaves notable gaps: all parameters are optional so the minimum viable identifying input is undefined, multi-match resolution is unstated, and group assignment via groupResourceNames is not addressed. Adequate, but a careful agent would still have open questions.

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; the description rises above it by revealing that emails, phones, and fullName double as lookup keys for duplicate detection, a semantic the schema does not state. It does not clarify behavior with 22 parameters and zero required fields (e.g., what makes a call valid).

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 ('Smart add-or-edit Google Contact') and then spells out the actual mechanism: search by email, phone, or exact full name, merge/update if found, otherwise create. An agent can distinguish this from create_contact or update_contact purely from the description.

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 a concrete usage context ('when adding or editing contacts extracted from PNG/JPG images, text, or markup') and the implicit routing rule that makes it preferable to a plain create or update. It stops short of naming the sibling alternatives (create_contact, update_contact, parse_and_upsert_contact) as explicit when-to-use/when-not-to-use contrasts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.