Skip to main content
Glama

mergeEntities

Merge a source entity into a target entity by repointing all relations, facts, and mentions to the target, then deleting the source row and logging an audit event.

Instructions

Merge source entity into target: repoints all relations, facts, and mentions from source to target, then removes the source entity row. Append-only: an entityMerged event is written to the audit log. Returns E_VALIDATION when source and target are the same uid, E_NOT_FOUND when either uid is unknown.

Input Schema

NameRequiredDescriptionDefault
sourceEntityUidYesULID of the entity to absorb (will be deleted). Required.
targetEntityUidYesULID of the surviving entity. Must differ from sourceEntityUid. Required.

Output Schema

NameRequiredDescriptionDefault
nameYesAIP resource name of the surviving (target) entity.
statusYesAlways "merged" on success.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses destructive effects (source row removed), side effects (relations, facts, and mentions repointed), audit logging, and specific error conditions. It stops short of mentioning permissions, authorization requirements, or explicit irreversibility.

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?

The description is front-loaded with the core action and uses three tight sentences with zero waste: operation mechanics, audit behavior, and error returns all earn their place.

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?

Given the output schema and fully described input schema, the description is nearly complete for invocation: it explains behavior, side effects, and error modes. It misses only usage guidance and permission/auth context for this destructive operation.

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 coverage is 100%, so the parameter descriptions already provide detailed ULID semantics and constraints. The tool description reinforces source/target roles but adds no syntax or format details beyond what the schema provides.

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?

The description states a specific verb and resource: merging a source entity into a target entity. It explains the operation's mechanics—repointing relations, facts, and mentions, then deleting the source row—which clearly distinguishes it from sibling tools like deleteEntity or updateEntity.

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?

The description does not say when to use this tool versus alternatives such as deleteEntity, updateEntity, or listDupCandidates. It provides no explicit context, prerequisites, or exclusions to guide tool selection.

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