Skip to main content
Glama

query_graph

Traverse the knowledge graph from an entity using BFS to collect connected entities and memories within a specified number of hops.

Instructions

Multi-hop graph traversal from an entity. Performs BFS traversal of the knowledge graph starting from the given entity, collecting all connected entities and memories within max_hops hops. Requires storage adapter with graph capability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum memories to return (default 20, max 100)
max_hopsNoMaximum traversal depth (default 2, max 5)
entity_textYesThe starting entity text to traverse from
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It describes the algorithm and requirements but does not state that the tool is read-only (no side effects), nor does it mention auth needs or rate limits. This is a significant gap for a graph traversal tool.

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?

The description is two sentences: first states the purpose, second adds algorithmic detail and a prerequisite. No wasted words, front-loaded with key action. Perfectly concise.

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?

No output schema exists, so the description should clarify return structure. It mentions 'collecting all connected entities and memories' which hints at output but lacks specifics on format or pagination. With no annotations, completeness is adequate but not thorough.

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?

Input schema has 100% coverage with descriptions for all three parameters. The description adds context about BFS traversal but does not add meaning beyond what the schema already provides for each parameter. Baseline score of 3 is appropriate.

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 performs 'multi-hop graph traversal' from an entity using BFS, specifying the starting entity and collecting connected entities and memories within max_hops. This distinguishes it from sibling tools like 'shortest_path'.

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 mentions the prerequisite 'Requires storage adapter with graph capability' but does not explicitly state when to use this tool versus alternatives (e.g., shortest_path for path finding). Provides necessary context but lacks comparative guidance.

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/lulin70/carrymem'

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