Skip to main content
Glama

Relate Knowledge

kg_relate

Create or reinforce a relationship between two knowledge nodes and reactivate both, enabling agents to connect decisions, problems, and reasoning in shared memory.

Instructions

Create a relationship between two knowledge nodes, or reinforce it if it already exists (the edge weight increases). Both nodes are reactivated (their decay scores are boosted). Requires an active session; limited to 100 edges per session.

Input Schema

NameRequiredDescriptionDefault
toYesTarget node ID
fromYesSource node ID (e.g., "node:abc123")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only flag non-read-only, non-idempotent, non-destructive; the description adds real behavior: existing edges gain weight rather than duplicating, both endpoint nodes get their decay scores boosted, and a session must be active with a 100-edge cap. These are side effects and limits the agent could not infer from structured fields, and the reinforcing-weight behavior is consistent with idempotentHint=false.

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 short sentences, front-loaded with the action and its upsert semantics, then side effects, then constraints. Nothing redundant and nothing padding.

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?

For a two-parameter mutation tool, the description covers side effects, session requirement, and quota, which is most of what an agent needs. With no output schema, it leaves the return value (what the created/reinforced edge looks like) unspecified, a minor but real gap.

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% and both parameters are documented in the schema, including the 'node:abc123' ID format example. The description only implies directionality ('between two knowledge nodes') without adding format or ordering semantics beyond what the schema already provides, so the baseline 3 applies.

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?

States a specific verb and resource ('Create a relationship between two knowledge nodes') plus the upsert variant ('reinforce it if it already exists'). The edge-between-nodes framing cleanly separates it from sibling node tools like kg_node_create and kg_node_update without needing to name them.

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?

Gives a hard precondition ('Requires an active session') and a quota ('limited to 100 edges per session'), which directly shape when the call can be made. It does not name alternatives (e.g., kg_node_create for the nodes themselves) or state when not to use it, so it stops short of full routing guidance.

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