Skip to main content
Glama

n2_entity_upsert

Add or update entities such as people, hardware, projects, or concepts, and automatically merge attributes when the entity already exists.

Instructions

Add or update entities (person, hardware, project, concept). Auto-merges attributes if entity exists.

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": {
      "entities": "<entities>"
    },
    "name": "n2_entity_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
entitiesYesEntities to upsert

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv9.2.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden, and "Auto-merges attributes if entity exists" is a genuinely useful behavioral trait: it tells the agent the operation is merge-like rather than destructive replace. However, it leaves open how conflicting attribute values are resolved, whether a merge can delete or overwrite existing keys, whether the whole batch is atomic, and what the call returns.

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, zero filler, with the core action stated first and the merge behavior as a supporting clause. Nothing needs trimming.

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 one-parameter tool with full schema coverage and no output schema, the description covers the essential action and the key merge semantics. The remaining gap is modest: it does not say what comes back (e.g., created vs updated indication) or how batch duplicates are handled, which an agent calling with an array of entities would want to know.

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

Parameters3/5

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

Schema description coverage is 100% for the single array parameter and its nested fields, so the schema already documents name, type, and attributes. The description's parenthetical type list adds nothing beyond the schema and is in fact a subset of it (it omits "place" and "service"), so no extra meaning is conveyed.

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?

The description gives a specific verb pair plus resource ("Add or update entities") and enumerates concrete entity kinds, so an agent can immediately tell this is a write path for entities and not a lookup. It does not name the closest sibling (n2_entity_search) as the read counterpart, so the differentiation is inferable rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit statement of when to prefer this over the other write tools in the sibling set (n2_core_write, n2_brain_write) or over n2_entity_search for reads. The phrase "Add or update" implies both create and update are handled in one call, but no prerequisites, exclusions, or alternatives are given.

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