Skip to main content
Glama

addIdentifier

Attach aliases or external identifiers to an existing entity so renamed records retain prior names for resolver and wikilink matching.

Instructions

Attach an identifier (an alias by default) to an EXISTING entity, appending an entityIdentifierAdded event so the resolver and vault wikilinks match the entity by that surface form. Use this after renaming an entity's displayName via updateEntity to retain the prior name: addIdentifier{entityUid, identifier:"Old Name", kind:"alias"}. createEntity only seeds identifiers at mint time; this adds them later. kind defaults to "alias"; pass email/username/phone/id or a snake_case domain type for other identifiers. Returns E_NOT_FOUND when the uid does not resolve and E_VALIDATION on an empty identifier or malformed kind.

Input Schema

NameRequiredDescriptionDefault
kindNoIdentifier kind in snake_case. Canonical: alias, email, username, phone, id; domain types (hrb, lei, tax_id, …) keep their own lookup lane. Defaults to "alias" when omitted — the kind to use for retaining an old display name after a rename.
entityUidYesULID of the existing entity to attach the identifier to. Required.
identifierYesThe surface form / external identifier to attach, e.g. a prior display name "Erebor Global", an email, a username, or a domain id. Required.

Output Schema

NameRequiredDescriptionDefault
nameYesAIP resource name of the entity the identifier was attached to.
statusYesAlways "added" on success.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden and mostly succeeds: it discloses the event emission, resolver/wikilink matching consequence, the kind default, and the two error codes (E_NOT_FOUND, E_VALIDATION) with their triggers. It does not address idempotency or what happens if the identifier is already attached, nor any permission requirements, which is the remaining gap for a mutation tool.

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

Conciseness4/5

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

Front-loaded with purpose and the sibling distinction before the example and error behavior, and every sentence carries information. The inline call example partially restates the schema but is justified as usage illustration; it could be trimmed slightly without loss.

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?

For a three-parameter mutation with an output schema present, the description covers the mutation's meaning, its downstream effect on resolution, the default and allowed kinds, and failure modes. Nothing beyond return-value shape is missing, and return values are handled by the output schema.

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 already 100%, so the baseline is 3; the description adds real value on top by stating kind defaults to "alias", listing accepted canonical kinds (email/username/phone/id) and domain snake_case types, and showing a worked call with the old-name alias case. Slight overlap with the schema's own kind description keeps it from a 5.

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 (attach) on a specific resource (identifier) with the critical scope constraint that the entity must already exist, plus the side effect of appending an entityIdentifierAdded event. It explicitly distinguishes itself from the two nearest siblings, createEntity and updateEntity.

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

Usage Guidelines5/5

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

Gives a concrete when-to-use scenario (retain the prior name after renaming displayName via updateEntity) and names the alternative it is not (createEntity only seeds identifiers at mint time). The condition that selects this tool over its siblings is unambiguous.

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