Skip to main content
Glama

create_relation

Create typed semantic relations between entities to model alliances, locations, causes, and other connections in a book's world. Specify source, target, relation type, and strength.

Instructions

Create a semantic relation between two entities

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": {
      "bookId": "<bookId>",
      "sourceId": "<sourceId>",
      "sourceType": "<sourceType>",
      "targetId": "<targetId>",
      "targetType": "<targetType>",
      "type": "<type>"
    },
    "name": "create_relation"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesRelation type, e.g. 'allies_with', 'located_in', 'caused'
bookIdYesBook ID
sourceIdYesSource entity ID
strengthNoRelation strength 1-10, default 5
targetIdYesTarget entity ID
sourceTypeYes
targetTypeYes
descriptionNo
inverseTypeNoInverse relation type, e.g. 'has_ally', 'contains'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds nothing beyond that: it does not explain the role of inverseType, whether an inverse relation is auto-created, how strength defaults, or whether duplicate relations are rejected — all meaningful behavior for a 9-parameter mutation.

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?

A single front-loaded sentence with no filler, so nothing is wasted. The brevity reflects under-specification rather than tight writing, but on structure alone it is clean.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 9 parameters, 6 required, and no output schema, the description is far too thin. It should at minimum explain whether inverseType auto-creates a reciprocal relation, what strength defaults to, and what is returned on success, since the annotations only cover the safety profile.

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 description coverage is 67%, with most key parameters (bookId, sourceId, targetId, type, strength, inverseType) documented inline. The description contributes zero parameter meaning, and the undocumented 'description' field plus the semantics of inverseType remain unexplained, so it neither compensates nor detracts.

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?

The description gives a specific verb and resource ('Create a semantic relation between two entities'), which is clear enough for an agent to know what the tool produces. It does not, however, distinguish itself from siblings like delete_relation or update_relation, nor does it clarify how 'semantic relation' differs from other link-creating tools.

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?

There is no guidance on when to use this versus delete_relation, update_relation, or the various create_* entity tools. No prerequisites, no exclusions, and no mention of what happens when a relation already exists between the same two entities.

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