Skip to main content
Glama

upsert_entity

DestructiveIdempotent

Crea una nueva entidad en el knowledge graph, o actualiza la existente si ya hay una con el mismo canonical_name.

Usar para:
- Crear personas, proyectos, organizaciones o conceptos nuevos
- Actualizar descripción o aliases de una entidad existente por nombre

El canonical_name debe ser la forma normalizada del nombre (ej: "Juan Pérez", no "Juanpe" o "Juan").
aliases: lista de nombres alternativos o abreviaciones por los que también se conoce la entidad.
context: texto de contexto adicional (ej: "Cliente desde 2022, empresa de software en BsAs").

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": {
      "canonical_name": "<canonical_name>",
      "type": "<type>"
    },
    "name": "upsert_entity"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesTipo: person=personas, project=proyectos, organization=empresas/orgs, category=categorías, entity=otros
aliasesNoNombres alternativos o abreviaciones (ej: ['Juan', 'JP'])
contextNoContexto adicional: rol, relación, notas sobre la entidad
descriptionNoDescripción breve de la entidad
workspace_idNoUUID del workspace, o su nombre tal como lo dice el usuario ('Acme', 'el personal'). Omitir si el token ya tiene workspace fijo
canonical_nameYesNombre canónico único, normalizado (ej: 'Empresa ABC S.A.', 'Juan Pérez')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true and destructiveHint=true; the description usefully explains the mechanism behind idempotency (matching on canonical_name). However, it never warns that the update path overwrites existing description/aliases, which is what the destructiveHint implies, and says nothing about permissions or what happens on name collisions across types.

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 the core action and the matching rule, then a compact bulleted block, then per-field notes. Nothing is filler, though the per-parameter prose overlaps the schema descriptions more than strictly necessary.

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?

With six parameters, two required, no output schema, and rich annotations, the description supplies the semantics the structured fields cannot: normalization rules, the upsert match key, and example context text. Only the overwrite behavior on update is left unstated.

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 every parameter is already documented, which sets the baseline at 3. The description does add genuine interpretation beyond the schema: canonical_name must be the normalized form ('Juan Pérez', not 'Juanpe') and context is a free-text note such as 'Cliente desde 2022'. Useful but not a fundamental re-reading of the contract.

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 and resource: creates a new entity in the knowledge graph or updates the existing one when canonical_name matches. That upsert condition is the key differentiator from a plain update tool, though it never names a sibling such as update_entity, so the agent must infer the boundary.

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

Usage Guidelines4/5

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

The 'Usar para' bullets give concrete use cases (new person/project/organization/concept, updating description or aliases of an existing entity by name), which is clear positive guidance. It stops short of stating when not to use it or which sibling handles pure field updates, so the routing burden remains partly on the agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources