Skip to main content
Glama

connect

Create typed, narrative relationships between memories to document causality, dependencies, contradictions, or governance. Supports single or batch connections.

Instructions

Connect memories with typed, narrative relationships. Valid relationship types are: caused_by, led_to, blocked_by, unblocks, connects_to, contradicts, depends_on, is_example_of, governed_by, resolved, resolved_by, supersedes — and all memory IDs must already exist before calling this.

Single mode (omit items): provide from_memory, to_memory, relationship directly.

Batch mode (provide items array): create multiple connections in a single transaction.

Relationship guidance: caused_by / led_to describe the same link from opposite ends (A caused_by B ≡ B led_to A). blocked_by / unblocks describe dependency on resolving an external issue. depends_on is a hard technical or logical prerequisite. contradicts marks a direct conflict. is_example_of marks an illustration. governed_by links a memory to a standing rule or constraint that it must satisfy. connects_to is the general fallback — use it only when no typed relationship fits.

Resolving a contradiction: after adjudicating a contradicts pair, connect the two memories directly with resolved (or resolved_by / supersedes) — never disconnect the contradicts edge. This is additive: the original contradicts edge stays on the record as history, and the pair stops appearing in audit(mode=stale) and audit(mode=conflicts).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNoBatch mode: array of edge objects. Each must have from_memory, to_memory, relationship (string). Optional: narrative (string).
narrativeNoThe story of this connection - why these two things are linked
to_memoryNoID of the target memory. Required in single mode; omit when using items.
from_memoryNoID of the source memory. Required in single mode; omit when using items.
relationshipNoType of relationship. Required in single mode. Use resolved (or resolved_by / supersedes) to adjudicate a contradicts pair — additive, does not remove the contradicts edge.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that resolving a contradiction is additive (does not remove the contradicts edge) and explains the effect on audit modes. It does not cover idempotency or rate limits, but the key behavioral trait (additive resolution) is well explained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately long but well-structured. It front-loads the purpose, lists relationships, then explains modes and guidance. Some redundancy exists (e.g., repeating relationship types from the schema), but overall it is clear and organized.

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?

Given the complexity (5 parameters, 12 enums, nested batch mode), the description is remarkably complete. It covers all modes, relationship types, prerequisites, and the additive resolution behavior. The lack of output schema is mitigated by the explanation of state changes.

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 baseline is 3. The description adds significant meaning beyond schema by explaining relationship semantics (e.g., 'caused_by / led_to describe the same link from opposite ends') and the distinction between single and batch modes. This elevates the score.

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: 'Connect memories with typed, narrative relationships.' The verb 'connect', resource 'memories', and the typed nature are explicit. This distinguishes it from siblings like 'disconnect' and 'suggest_connections'.

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?

The description explains single vs batch mode, lists valid relationship types, and provides guidance on when to use each relationship. It notes prerequisites (memory IDs must exist) but lacks explicit 'when not to use' or comparison with all siblings. However, the guidance is sufficient for most use cases.

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/corbym/memoryweb'

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