Skip to main content
Glama

Graph Relate

graph_relate
Idempotent

Create or strengthen relationships between entities, auto-creating missing endpoints. Use single mode for one fact or batch mode for atomic extraction from documents. Re-asserting an existing edge boosts its weight.

Instructions

Create or strengthen a relationship between entities. Creates the endpoint entities if they don't exist. Use single mode (from_name/to_name/relation) for one fact at a time. Use batch mode when extracting from a transcript or document — it's atomic, so a partial failure won't leave dangling nodes. Idempotent: re-asserting an existing edge boosts its weight rather than duplicating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_nameNoSource entity name (single mode)
from_typeNoSource entity type (single mode)
to_nameNoTarget entity name (single mode)
to_typeNoTarget entity type (single mode)
relationNoRelationship type (single mode)
weightNoEdge weight 0.0-1.0
propertiesNoAdditional properties
evidenceNoWhy this relationship exists
valid_atNoWhen this fact became true
source_sessionNoSession ID for provenance
source_transcriptNoTranscript path for provenance
source_typeNoSource type: conversation, ingest, manual, bootstrap
batchNoBatch mode: create multiple entities and relationships atomically
Behavior4/5

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

Annotations provide idempotentHint=true; the description adds that endpoint entities are created if missing, batch mode is atomic, and re-asserting an edge boosts weight. This goes beyond annotations without contradicting them.

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?

Three sentences, all front-loaded with key purpose and usage. No redundant information; every sentence adds value and is clearly structured.

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?

Given the tool's complexity (13 parameters, nested objects, no output schema), the description covers essential behavioral aspects (modes, atomicity, idempotency). It could mention return values or error conditions, but overall it is sufficiently complete.

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% with descriptions for all parameters. The description adds context for modes and idempotency but does not elaborate on individual parameter semantics beyond what the schema already provides, meriting a baseline score of 3.

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?

The description clearly states the tool's purpose: 'Create or strengthen a relationship between entities' and mentions creating endpoints if they don't exist. It also distinguishes single and batch modes, which differentiates it from sibling tools like graph_delete or graph_merge.

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?

Explicitly advises when to use each mode: 'Use single mode for one fact at a time. Use batch mode when extracting from a transcript or document — it's atomic.' Also notes idempotency and weight boosting, helping the agent choose appropriately.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/stevepridemore/graph-memory'

If you have feedback or need assistance with the MCP directory API, please join our Discord server