Skip to main content
Glama

upsert_contact

Idempotent

Create or update contacts with email/phone deduplication and idempotent replay; use dry_run to preview changes before writing.

Instructions

Create or update a contact, deduplicated on email/phone. Idempotent on replay. Pass dry_run=true to preview the change without writing.

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
tagsNoTags to attach. Existing tags are preserved by the platform.
emailNoContact email. Email or phone is required.
phoneNoContact phone in E.164. Email or phone is required.
dry_runNoPreview only. Returns the create/update decision and the fields that would change; writes nothing and needs no approval.
last_nameNo
first_nameNo
idempotency_keyNoExplicit replay key. Defaults to a digest of email/phone.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the lower bar applies. The description still earns credit by naming the dedup key fields (email/phone) and explaining that dry_run writes nothing and requires no approval — behavior an agent could not infer from the hints alone.

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, front-loaded with the core operation, then the idempotency guarantee, then the safe-preview escape hatch. No filler, though the middle sentence is partly redundant with idempotentHint.

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 key risk areas for a mutation tool: dedup semantics, replay safety, and a no-write preview path. Minor gaps remain — it does not state the return shape for a real (non-dry) write, e.g. whether the response distinguishes created from updated, and there is no output schema to cover that.

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?

With 71% schema coverage the baseline is 3, and the description goes beyond it by revealing that email/phone act as the deduplication key, not merely as identity fields. The idempotency_key parameter is left to the schema, which already documents its default digest behavior.

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 pair plus resource ('Create or update a contact') and adds the distinguishing mechanism ('deduplicated on email/phone'). It is clearly separable from the read-oriented siblings get_contact and search_contacts, though it never names them explicitly.

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 create-or-update phrasing implies when to call it, and 'Pass dry_run=true to preview' gives one concrete usage instruction. There is no explicit when-not guidance or routing to get_contact/search_contacts for read-only lookups, so usage is inferred rather than stated.

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