Skip to main content
Glama

upsert_crm_contact

Destructive

Find or create a CRM contact for the user and return its id. Matches an existing contact by LinkedIn first (linkedInMemberId, LinkedIn's numeric member id, when given; then the linkedIn URL; then the person's older URLs in linkedInAliases), then by email, then by firstName + lastName at companyDomain; a match is attached to the user and reused (never duplicated), and one found by the member id or an older URL has its stored LinkedIn URL and member id replaced with the given ones (a shared contact changes for everyone who has it). When nothing matches, the contact is created (firstName required then; jobTitle, companyDomain and companyName seed the record; a given email is stored as the primary email), except that a teammate's contact with the same LinkedIn URL or member id can be reused instead and take the given name, job title and company (a teammate's custom contact found only by member id is not reused, so a second contact can be created). Pass listId (24-hex list id) to also add the contact to that list; a contact new to the list starts the user's automations triggered by additions to that list, and an active campaign that enrolls the list's new members can start messaging the person. Returns { contactId, created } where created is true when none of the lookups above matched (normally a new contact; a teammate's contact reused at the create step also answers true).

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_crm_contact"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailNo
listIdNo
jobTitleNo
lastNameNo
linkedInNo
firstNameNo
companyNameNo
companyDomainNo
linkedInAliasesNo
linkedInMemberIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations flag a non-read-only, destructive, open-world operation, and the description goes well beyond them: it discloses that a matched shared contact has its stored LinkedIn URL and member id overwritten 'for everyone who has it', that a teammate's contact can be hijacked at the create step, and that passing listId fires automations and can start campaign messaging. It also spells out the { contactId, created } return and the non-obvious case where created is true for a reused teammate contact.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and return shape are front-loaded, and nearly every clause carries real behavioral information, but the whole definition is a single run-on paragraph dense with nested parentheticals that an agent must parse in one pass. Breaking the matching chain, the create branch, and the listId side effects into separate sentences or a short ordered list would cost nothing and gain a lot.

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

Completeness5/5

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

There is no output schema, and the description nevertheless defines the return object and the edge case affecting the created flag. For a 10-parameter side-effecting upsert with cross-user effects, the behavioral surface an agent needs (matching order, dedup guarantee, shared-contact mutation, list enrollment consequences) is covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description must carry the full load, and it does: linkedInMemberId's meaning (LinkedIn's numeric member id), linkedInAliases as older URLs, listId as a 24-hex list identifier, firstName becoming required only at the create step, and jobTitle/companyDomain/companyName as seeding fields. It also explains the precedence relationship between email and firstName+lastName-at-companyDomain, which the schema cannot express.

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 — 'Find or create a CRM contact for the user and return its id' — which immediately separates it from lookup-only siblings like get_crm_contact_by_id and from the bulk push_crm_contacts/pull_crm_contacts tools. The scoping ('for the user', returns an id) is unambiguous.

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 clear model of when this tool applies: it is the find-or-create path, with an explicit matching precedence chain and explicit conditions under which creation happens. What is missing is comparative routing — it never says when to prefer get_crm_contact_by_id or push_crm_contacts instead, or when not to call it at all.

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.