Skip to main content
Glama
Knowledge Graph Memory Server

Knowledge Graph Memory Server

Create Relations

create_relations
Idempotent

Create multiple active-voice relations between existing entities in a knowledge graph to connect and organize stored memory, while skipping relations that already exist.

Instructions

Create multiple new relations between entities in the knowledge graph. Relations should be in active voice

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": {
      "relations": "<relations>"
    },
    "name": "create_relations"
  }
}

Input Schema

NameRequiredDescriptionDefault
relationsYesThe relations to create. Both ends must name existing entities; a relation already in the graph is not added again

Output Schema

NameRequiredDescriptionDefault
relationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.0
    • addedInput schema / properties / relations / description
      Added value: +"The relations to create. Both ends must name existing entities; a relation already in the graph is not added again"
  2. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed2 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "relations": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "from": {
      +            "description": "The name of the entity where the relation starts",
      +            "type": "string"
      +          },
      +          "relationType": {
      +            "description": "The type of the relation",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "The name of the entity where the relation ends",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to",
      +          "relationType"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "relations"
      +  ],
      +  "type": "object"
      +}
  4. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds a convention beyond the annotations, namely that relation types should be phrased in active voice, but it says nothing about failure modes when an endpoint is not an existing entity.

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?

Two short sentences, the core action stated first and the naming convention second, with no filler or repetition of the schema.

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?

An output schema exists and annotations cover the mutation and idempotency profile, so the description needn't explain return values. The remaining gap is behavioral detail for endpoints that do not resolve to existing entities, which the schema only hints at.

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?

With a single parameter at 100% schema coverage the baseline is 3, but the description adds real meaning the schema lacks: the active-voice convention determines how relationType values should be phrased. The rest of the parameter shape (from, to, relationType, plus deduplication) is already documented in the schema.

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 multiple new relations') plus the scope ('between entities in the knowledge graph'), which clearly separates it from sibling tools such as create_entities or add_observations. It stops short of naming a sibling explicitly, so a 4 rather than a 5.

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 tool versus create_entities or add_observations, and no stated prerequisites (e.g. that both entities must already exist). 'Relations should be in active voice' is a naming convention, not an indication of when to choose this tool.

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