Skip to main content
Glama

create_relation

Destructive

Creates a source-backed directed relation only when a user explicitly states a durable relation; requires resolved endpoint IDs and a captured source memory ID.

Instructions

Create a source-backed directed relation only when the user explicitly states a durable relation. Resolve both endpoint ids with create_entity, capture the user's relation statement, then pass those ids plus the capture result's source_memory_id. If a conflicting relation already exists for the same endpoints, the daemon may auto-supersede that existing relation. Entity names are not accepted or auto-created. Never infer an unstated relation.

Input Schema

NameRequiredDescriptionDefault
to_entity_idYesResolved target entity id (e.g. 'ent_wenlan'). Obtain it from create_entity; names are not accepted or auto-created.
relation_typeYesVerb describing the directed relation (e.g. 'works_on', 'prefers', 'uses', 'depends_on'). Snake_case, present-tense.
from_entity_idYesResolved source entity id (e.g. 'ent_alice'). Obtain it from create_entity; names are not accepted or auto-created.
source_memory_idYesRequired source memory id returned by capture for the user's explicit relation statement.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.19.3

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false; the description earns its keep by explaining why – conflicting relations may be auto-superseded by the daemon. It also discloses the provenance requirement (a backing source_memory_id) and that names are not auto-created. It stops short of saying whether superseding is reversible or what the response contains, so not a 5.

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?

The gating rule is front-loaded in the first sentence, followed by the workflow in execution order. It is dense but nearly every clause carries a distinct constraint; only the endpoint-id sourcing is stated twice (once in prose, once in schema).

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?

No output schema exists, yet the description supplies the preconditions, the prerequisite tool chain, the supersede side effect, and the source-provenance rule an agent needs before invoking a destructive write. Nothing material is missing.

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 100%, so a 3 is the baseline; the description adds genuine semantics on top by specifying where each id must come from (create_entity for endpoints, capture for source_memory_id) and by defining relation_type as a snake_case present-tense verb.

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 ('Create a source-backed directed relation') plus the gating condition ('only when the user explicitly states a durable relation'). It is clearly separable from create_entity, which it explicitly references as a prerequisite step rather than a substitute.

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 an explicit ordered workflow (resolve ids with create_entity, capture the statement, then pass the ids plus source_memory_id) and an explicit negative rule: 'Entity names are not accepted or auto-created. Never infer an unstated relation.' Both when-to-use and when-not-to-use are covered.

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