Skip to main content
Glama

get_subgraph

Retrieve all nodes and edges connected to a root design node within a specified depth and any direction, optionally filtered by edge type, to explore project knowledge structure.

Instructions

Everything connected to root_id within depth hops, any direction.

Input Schema

NameRequiredDescriptionDefault
depthNo
root_idYes
edge_typesNo

Output Schema

NameRequiredDescriptionDefault
edgesNo
nodesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose one meaningful behavioral trait beyond the schema: traversal is direction-agnostic ('any direction'). However, it says nothing about read-only safety, result size/limits, or whether cycles are handled.

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?

A single tightly-worded sentence with the core semantics front-loaded. Every word (connected, root_id, depth, hops, any direction) earns its place with no filler.

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?

An output schema exists, so return values need not be described, which lightens the burden. Still, for a 3-parameter graph traversal tool with zero annotation coverage, omitting the `edge_types` filter and any usage/scope guidance leaves clear gaps.

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 clarifies `depth` as measured in 'hops' and anchors `root_id` as the traversal origin, which adds real meaning. However, the `edge_types` filter parameter is entirely unmentioned in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation: retrieve everything connected to root_id within `depth` hops. It is clearly a traversal/retrieval tool distinguishable from mutation siblings like create_edge or delete_node, though it doesn't explicitly differentiate itself from the `neighbors` sibling.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no mention of alternatives such as `neighbors` (likely the single-hop analogue). The agent must infer from the phrase 'within depth hops' that this is the multi-hop traversal option.

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