Skip to main content
Glama

graph_query_context

Retrieves the dependency subgraph for a file or symbol, including adjacent modules, to reveal code relationships and support impact analysis.

Instructions

Return the dependency subgraph for a file or symbol, plus adjacent modules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path (relative to project root)
depthNoTraversal depth
symbolNoOptional symbol name to focus on

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It only says a graph is returned; it does not state whether the operation is read-only, how depth or symbol affect traversal, what 'adjacent modules' means, or any limits or performance traits. This is a notable gap for a query tool.

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?

A single sentence with no filler; the main action is front-loaded and the phrasing is tight. It is concise, though the brevity omits useful behavioral and usage details.

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?

The core purpose and key parameters are covered between the description and the schema, so the tool is minimally invocable. However, with no output schema and no annotations, the vague phrase 'plus adjacent modules' and the lack of result-shape or traversal context leave meaningful 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 100%, so all parameters are already documented in the schema. The description's 'file or symbol' loosely maps to path and symbol but adds no meaningful detail beyond what the schema provides.

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 ('Return') and a distinct resource ('dependency subgraph for a file or symbol, plus adjacent modules'), making the tool's core purpose clear. It differentiates from siblings like graph_stats and graph_impact_analysis, though it does not explicitly 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 Guidelines3/5

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

The description implies the tool is for retrieving dependency structure, which gives a reasonable cue for when to use it. However, it offers no explicit guidance on when to prefer this over graph_impact_analysis or graph_get_side_effects, and no exclusions or alternative conditions are provided.

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