Skip to main content
Glama

add_entity_relation

Idempotent

Crea una relación entre dos entidades del Atlas. Si ya existe, la deja como está y la devuelve: para cambiarle el tipo, change_entity_relation_type.

Tipos de relación:
- hierarchy: relación jerárquica genérica (A es parte de B)
- holding: relación holding/subsidiaria
- org: A pertenece a organización B
- area: A es área dentro de B
- subarea: A es sub-área de B
- team: A es equipo de B
- client: A es cliente de B
- partner: A es partner/socio de B

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": {
      "from_entity_id": "<from_entity_id>",
      "to_entity_id": "<to_entity_id>"
    },
    "name": "add_entity_relation"
  }
}

Input Schema

NameRequiredDescriptionDefault
to_entity_idYesID de la entidad destino (el 'to' de la relación)
workspace_idNoUUID del workspace, o su nombre tal como lo dice el usuario ('Acme', 'el personal'). Omitir si el token ya tiene workspace fijo
relation_typeNoTipo de relación (default: hierarchy)
from_entity_idYesID de la entidad origen (el 'from' de la relación)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false; the description adds the concrete behavior behind idempotency — an existing relation is returned unchanged rather than mutated. It does not cover permissions or workspace scoping requirements, but with annotations carrying the safety profile that is a minor gap.

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?

Front-loaded with the core action and the sibling escape hatch in the first two sentences, then a scannable bulleted taxonomy. The type list is long but each line carries semantic information not present in the enum, so it earns its space.

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 4-parameter mutation with no output schema, the definition covers what happens on creation, what happens on conflict, and the meaning of the type domain. Return shape is only loosely implied ('la devuelve'), which is the one remaining gap.

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 description coverage is 100%, so baseline would be 3; the description earns above that by explaining what each relation_type value means (hierarchy, holding, org, area, subarea, team, client, partner), which the enum alone does not convey. It adds nothing for from/to IDs or workspace_id, which the schema already documents.

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 and resource ('Crea una relación entre dos entidades del Atlas') and immediately distinguishes the operation from the sibling that changes relation type. An agent can tell what this tool does without opening the schema.

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?

Explicitly routes the agent to change_entity_relation_type when the goal is to alter an existing relation's type, and the idempotent 'if it exists, leave it and return it' note implicitly tells the agent not to check first. No guidance on when to prefer this over other entity operations, but the key alternative is named.

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