Skip to main content
Glama

upsert_entity

Create or merge a knowledge-graph entity using a stable canonical key to deduplicate company, security, or person records and preserve linked research.

Instructions

Create an entity (or merge into the one with the same canonical_key).

Input Schema

NameRequiredDescriptionDefault
kindNocompany
nameYes
aliasesNoOther names, abbreviations
tickersNo
canonical_keyNoStable id such as cik:0001045810; merges on match

Output Schema

NameRequiredDescriptionDefault
idYes
kindYes
nameYes
attrsYes
aliasesYes
created_atYes
updated_atYes
canonical_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, closed-world write, so the safety profile is covered. The description adds real value by disclosing the merge-on-match behavior, but it never says what happens to existing aliases/tickers on a merge (appended vs. overwritten) — a material ambiguity for an upsert.

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?

A single front-loaded sentence with zero filler; the destructive/merge nuance is packed into the parenthetical rather than buried in prose.

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

Completeness3/5

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

An output schema exists, so return values need not be described. However, for a 5-parameter mutation with 40% schema coverage and a sibling (merge_entities) that overlaps semantically, the description should clarify merge semantics and sibling selection; it leaves both underdetermined.

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

Parameters2/5

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

Schema coverage is only 40%: aliases and canonical_key are documented in the schema, while name, kind, and tickers are not. The description only echoes canonical_key matching, which the schema already states, and adds nothing about kind's defaults or ticker handling, so it fails to compensate for the coverage gap.

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 and resource ('Create an entity') and adds the non-obvious upsert twist: it merges into an existing entity on canonical_key match. It does not name the closely related siblings get_entity or merge_entities, so the agent must infer which one to reach for.

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 parenthetical implies the merge condition (same canonical_key), which is the key usage signal, but there is no explicit when-to-use guidance, no prerequisites, and no statement about when an agent should call merge_entities or get_entity instead.

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