Skip to main content
Glama

upsert_opportunity

Create or update a CRM opportunity by matching on pipeline and contact, so duplicate records are avoided while stage, status, value, and assignee stay current.

Instructions

Create or update an opportunity. Matches by pipeline + contact.

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": {
      "pipelineId": "<pipelineId>",
      "pipelineStageId": "<pipelineStageId>",
      "contactId": "<contactId>",
      "name": "<name>"
    },
    "name": "upsert_opportunity"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesOpportunity name
statusNoopen
contactIdYesContact ID
assignedToNoAssigned user ID
pipelineIdYesPipeline ID
monetaryValueNoMonetary value
pipelineStageIdYesPipeline stage ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the matching key but omits critical mutation details: whether a match overwrites all fields or only supplied ones, what happens on multiple matches, permission requirements, and what the response contains. For a write tool with zero annotation coverage, this is a significant gap.

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

Conciseness5/5

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

Two short sentences, front-loaded with the action and matching rule. No wasted words; appropriately terse for a simple upsert.

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

Completeness2/5

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

The tool is a multi-field upsert with no annotations and no output schema. The description covers the matching logic but leaves the update/overwrite behavior and return values unexplained, so an agent cannot fully predict the effect of a call. It is under-specified for the tool's complexity.

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 high (86%), so the schema already documents most fields. The description adds the relationship between pipelineId and contactId as a composite match key, which the schema does not state. It does not clarify the semantics of status, assignedTo, monetaryValue, or pipelineStageId, but the matching-key addition is meaningful.

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 (create/update) and resource (opportunity) and gives the matching key (pipeline + contact), which distinguishes it from plain create/update siblings. It does not explicitly name those siblings as alternatives, so it falls short of a 5.

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 matching rule implies when to use an upsert (when you don't know whether the opportunity exists and want to match on pipeline + contact), but there is no explicit when-not guidance or comparison to create_opportunity/update_opportunity. Usage is implied rather than prescribed.

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

Deploy Server

Other Tools