Skip to main content
Glama
stevepridemore

Graph-Memory

Graph Relate

graph_relate
Idempotent

Create or strengthen relationships between entities, auto-creating missing ones. Use single mode for one fact or atomic batch mode to extract many from a transcript.

Instructions

Create or strengthen a relationship between entities. Creates the endpoint entities if they don't exist, matching existing ones by name, case-insensitive name, or alias first. 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 runs in one transaction, so a database failure keeps nothing, while an invalid item is skipped and reported without blocking the rest. Types and relations must use the documented vocabulary (see GRAPH_SCHEMA.md); an unknown relation is stored as RELATED_TO with the original kept in proposed_relations, and an unknown type as Object with proposed_type. Idempotent: re-asserting an existing edge strengthens it (capped at 1.0) and reports action "strengthened".

Input Schema

NameRequiredDescriptionDefault
batchNoBatch mode: create multiple entities and relationships atomically
weightNoEdge weight 0.0-1.0
to_nameNoTarget entity name (single mode)
to_typeNoTarget entity type (single mode)
evidenceNoWhy this relationship exists
relationNoRelationship type (single mode)
valid_atNoISO-8601 date this fact became true. Also REPLACES the previous value: other edges of this type from the same source are marked invalid as of this date. Omit it for facts that can hold several values at once. FAMILY_OF, KNOWS, COLLABORATES_WITH, MENTOR_OF, ALIAS_OF, CONTRADICTS and RELATED_TO never supersede.
from_nameNoSource entity name (single mode)
from_typeNoSource entity type (single mode)
propertiesNoAdditional properties
source_typeNoSource type: conversation, ingest, manual, bootstrap
source_sessionNoSession ID for provenance
source_transcriptNoTranscript path for provenance

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / valid_at / description
      Previous value: -"When this fact became true"New value: +"ISO-8601 date this fact became true. Also REPLACES the previous value: other edges of this type from the same source are marked invalid as of this date. Omit it for facts that can hold several values at once. FAMILY_OF, KNOWS, COLLABORATES_WITH, MENTOR_OF, ALIAS_OF, CONTRADICTS and RELATED_TO never supersede."
  2. Addedv0.2.2
  3. Removedv0.1.4
  4. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

With only idempotentHint available, the description carries real weight and delivers: batch runs in one transaction so a DB failure keeps nothing, an invalid item is skipped and reported without blocking the rest, unknown relations degrade to RELATED_TO with the original preserved in proposed_relations, unknown types to Object with proposed_type, and re-assertion strengthens a capped edge with action 'strengthened'. These are exactly the non-obvious traits an agent needs before firing a 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?

Purpose is front-loaded and every clause carries information — no filler and no restatement of the title. It is a single dense paragraph with several stacked subordinate clauses (transaction behavior, fallback vocabulary, idempotency), which would scan better as short segments, but nothing is wasted.

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?

For a 13-parameter tool with nested batch objects and no output schema, the description covers the decision points that matter: mode selection, endpoint creation/matching, atomicity, per-item error handling, vocabulary fallbacks, and idempotent strengthening with a reported action. Return-value detail is minimized because there is no output schema to defer to, yet the one observable outcome ('strengthened') is named; the remaining batch relation-to-localId linkage stays with the schema.

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 the baseline is 3 and the schema already documents weight, relation, valid_at, provenance fields. The description adds meaning on top by grouping from_name/to_name/relation as the 'single mode' parameter set and tying the relation parameter to a required vocabulary with a documented fallback, which is more than the schema alone conveys.

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 opening sentence states a specific verb pair and resource: 'Create or strengthen a relationship between entities.' It goes further by explaining the auto-creation of missing endpoints and the match-by-name/case-insensitive/alias rule, so an agent immediately knows this is the graph write path rather than a read (graph_query) or maintenance (graph_prune) sibling.

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?

It explicitly splits usage into 'single mode (from_name/to_name/relation)' versus 'batch mode when extracting from a transcript or document', giving a concrete condition that selects each path. It stops short of naming sibling tools or stating when not to use this tool at all (e.g., deletion via graph_delete), so it is clear context without full routing guidance.

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