Skip to main content
Glama

graph_query

Analyze code dependencies and visualize relationships between symbols or classes to understand how components connect in your codebase.

Instructions

Trace how named symbols relate in the dependency graph → returns subgraph + Mermaid diagram. Input must contain symbol/class names (e.g. "How does AuthService reach Database?", "What depends on UserModel?").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language question about code relationships
depthNoMax traversal depth (default 3)
max_nodesNoMax nodes in result graph (default 100)
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 discloses the tool's core behavior (tracing relationships and returning visual outputs) but lacks details on performance characteristics (e.g., execution time, rate limits), error conditions, or authentication requirements. The mention of 'Mermaid diagram' adds useful context beyond basic functionality.

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 extremely concise and front-loaded: the first sentence establishes the core functionality and outputs, while the second provides crucial usage examples. Every word earns its place with no redundancy or fluff.

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?

For a tool with 3 parameters, 100% schema coverage, but no annotations or output schema, the description does an adequate job. It explains what the tool does and how to use it with examples, but lacks information about return format details (beyond 'subgraph + Mermaid diagram'), error handling, or performance considerations that would be helpful for an AI agent.

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%, providing clear documentation for all three parameters. The description adds value by explaining the 'query' parameter's purpose ('Natural language question about code relationships') with examples, but doesn't provide additional semantics beyond what the schema already covers for 'depth' and 'max_nodes'. Baseline 3 is appropriate given high schema coverage.

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 specific action ('Trace how named symbols relate'), the resource ('dependency graph'), and the outputs ('subgraph + Mermaid diagram'). It distinguishes from siblings like 'get_dependency_diagram' or 'get_call_graph' by emphasizing the natural language query capability and relationship tracing rather than predefined diagrams or specific graph types.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: for natural language questions about code relationships, with concrete examples ('How does AuthService reach Database?', 'What depends on UserModel?'). It implicitly distinguishes from siblings by focusing on query-based exploration rather than predefined analyses like 'get_circular_imports' or 'get_control_flow'.

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/nikolai-vysotskyi/trace-mcp'

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