Skip to main content
Glama

Add or update contacts

upsert_contacts
Idempotent

Add or update up to 1000 contacts in one call, matched by email: the import tool. All or nothing: one bad contact refuses the batch and the error names its index. For an existing contact a null field keeps what is stored, tags are added (never removed) and attributes are set. Contacts are enrolled in every live campaign whose audience they match. Adding a tag such as activated here takes the contact out of campaigns whose audience excludes that tag.

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": {
      "project_id": "<project_id>",
      "contacts": "<contacts>"
    },
    "name": "upsert_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
contactsYes
project_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say it is a non-read-only, idempotent, non-destructive, closed-world write. The description goes well beyond that with atomicity ('one bad contact refuses the batch'), error shape ('the error names its index'), merge semantics for nulls, additive-only tags, attribute replacement, and two non-obvious side effects: automatic campaign enrollment by audience match and removal from campaigns whose audience excludes a newly added tag. Those side effects are exactly the kind of information annotations cannot convey and that would surprise an agent otherwise.

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?

Five tight sentences, front-loaded with the batch-cap and match-key facts an agent needs first, then escalating to side effects. Slight waste in restating the 1000 limit that the schema already enforces, and the campaign-enrollment and tag-removal ideas could be one sentence instead of two.

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?

For a mutation tool with no output schema and no annotation detail, the description covers atomicity, error reporting, merge semantics, and downstream campaign effects, which is most of what an agent needs. It never says what a successful call returns (counts of created vs updated, affected enrollments), which is the main remaining gap.

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 0%, so the description must carry the load, and it does for the important cases: email is the match key, null keeps stored values rather than clearing them, tags are unioned rather than replaced, attributes are set. It does not explain project_id at all, and the 1000-item cap merely repeats maxItems already in the schema.

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 pair and resource ('Add or update ... contacts'), gives the batch ceiling, and pins the matching key ('matched by email'), then explicitly labels itself 'the import tool'. That label separates it from the single-record siblings create_contact and update_contact without the agent needing to open either schema.

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?

'The import tool' plus the 1000-contact batch framing implies bulk import versus the singular create_contact/update_contact, and the email-matching rule tells the agent it does not need to look up an ID first. It never states the inverse condition explicitly (e.g. 'use create_contact for one contact') nor any prerequisite permissions, so it stops short of full routing guidance.

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