Skip to main content
Glama

graph

Perform knowledge graph operations—entity relationships, memory and record links, co-occurrence edge backfill, and link-expanded recall.

Instructions

Knowledge graph operations — entity relationships, memory↔entity links, record-to-record links, co-occurrence auto-relate, and link-expanded recall.

ACTIONS:

  • "relate": Entity↔entity relationship (legacy).

  • "edges": Get all relationships for entity.

  • "link": Link a memory (rid) to an entity (legacy).

  • "search": Find entities by pattern.

  • "profile": Rich entity profile.

  • "depth": How deeply the system knows an entity.

  • "auto_relate": v0.8.0 — co-occurrence-driven edge backfill. Set dry_run=False to persist.

  • "record_link": v0.9.0 — add a record-to-record link (needs source_rid + target_rid + link_type).

  • "record_unlink": v0.9.0 — remove a record-to-record link.

  • "linked_records": v0.9.0 — traverse links from rid (direction = "outbound" | "inbound" | "both", optional link_type filter).

  • "recall_with_links": v0.9.0 — semantic recall with N-hop link expansion.

Args: action: One of the actions above. entity / target / relationship / weight / rid / pattern / limit / days / namespace: Legacy entity-graph args. source_rid / target_rid / link_type: For record_link / record_unlink. direction: For linked_records — "outbound" / "inbound" / "both". dry_run: For auto_relate — preview without persisting. max_edges: For auto_relate — cap edges proposed/created. query: For recall_with_links — natural language search. top_k: For recall_with_links — max seed results. expand_links: For recall_with_links — hop budget for traversal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ridNo
daysNo
limitNo
queryNo
top_kNo
actionYes
entityNo
targetNo
weightNo
dry_runNo
patternNo
directionNoboth
link_typeNo
max_edgesNo
namespaceNo
source_ridNo
target_ridNo
expand_linksNo
relationshipNorelated_to

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior1/5

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

Annotation Contradiction: The description explicitly includes 'record_unlink: remove a record-to-record link' and auto_relate persistence, both of which are mutating/destructive operations, yet annotations declare destructiveHint=false. This directly contradicts the structured metadata, so the description fails to align with the tool's actual behavioral profile.

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?

The description is well-structured with a summary line, a bulleted action list, and a grouped args section. It is front-loaded and scannable despite its length. The length is justified by the tool's multi-action nature and 19 parameters, though some repetition could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's high complexity (12 actions, 19 parameters) and the presence of an output schema, the description covers most actions and parameter groupings adequately. However, it lacks guidance on when to prefer this tool over sibling tools, and it does not describe return-value behavior or error conditions, leaving the overall context incomplete.

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 description coverage is 0%, so the description must compensate. It groups parameters by action (source_rid/target_rid/link_type for record_link, direction for linked_records, dry_run/max_edges for auto_relate, query/top_k/expand_links for recall_with_links), which adds useful meaning. However, many legacy parameters (weight, days, namespace, pattern, limit) are only listed without semantic explanation, leaving gaps.

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 identifies the tool as 'Knowledge graph operations' and enumerates 12 distinct actions with specific verbs and targets (relate, edges, link, search, profile, depth, auto_relate, record_link, record_unlink, linked_records, recall_with_links). This makes the tool's scope and capabilities immediately clear and distinguishes it from sibling memory/recall tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides action-specific usage details, such as 'Set dry_run=False to persist' for auto_relate, direction values for linked_records, and 'legacy' labels for relate/link. However, it does not explicitly state when to use this tool versus alternatives like recall or memory, nor does it provide exclusion criteria.

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/yantrikos/yantrikdb-mcp'

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