graph_query
Trace how named symbols relate in the dependency graph, returning subgraph plus Mermaid diagram using natural language queries with symbol names.
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 |
|---|---|---|---|
| depth | No | Max traversal depth (default 3) | |
| query | Yes | Natural-language question about code relationships. SQL is not accepted — use symbol names, e.g. "what depends on UserModel". | |
| max_nodes | No | Max nodes in result graph (default 100) |