graph_query
Trace how named symbols relate in a dependency graph using natural language queries. Returns a subgraph with nodes, edges, and a Mermaid diagram for ad-hoc code exploration.
Instructions
Trace how named symbols relate in the dependency graph → returns subgraph + Mermaid diagram. Input is NATURAL LANGUAGE only — NOT SQL. Must contain symbol/class names (e.g. "How does AuthService reach Database?", "What depends on UserModel?", "trace the flow of LoginHandler"). SQL-shaped input (SELECT/FROM/WHERE/JOIN…) is rejected with VALIDATION_ERROR — there is no SQL endpoint for the index. Weakly-grounded anchors (single-word collisions with many symbols) are dropped via god-name filter. Use for ad-hoc graph exploration. For structured call graph use get_call_graph instead. Read-only. Returns JSON: { nodes, edges, mermaid, truncated? }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural-language question about code relationships. SQL is not accepted — use symbol names, e.g. "what depends on UserModel". | |
| depth | No | Max traversal depth (default 3) | |
| max_nodes | No | Max nodes in result graph (default 100) |