query_graph
Search the relational index by keywords to discover relevant nodes and explore topology when exact IDs are unknown. Returns budget-limited Markdown report for read-only initial graph discovery.
Instructions
Query the relational index with keywords to find relevant nodes and explore their topology. Use this read-only tool for initial discovery when you do not yet know the exact node IDs. If you already know the target ID, use inspect_symbol instead. To trace deep multi-hop paths, use trace_path instead. The query mechanism scores nodes by keyword match and traverses their neighborhood (BFS by default, or DFS if dfs=true). Results are rendered as a structured Markdown report. To prevent context bloat, the output is strictly truncated to fit within the provided budget (default 2000).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dfs | No | Use depth-first search instead of BFS (default false) | |
| depth | No | Traversal depth (1–6, default 3) | |
| budget | No | Approximate output token budget (default 2000) | |
| keywords | Yes | Keywords or phrase to search for (space-separated) | |
| min_degree | No | Minimum node degree to include (filters low-degree noise) | |
| node_types | No | Optional file types to include, e.g. ['code', 'document', 'rationale'] | |
| path_prefix | No | Optional path prefix or path fragment to include (case-insensitive) | |
| exclude_path | No | Optional path prefix or path fragment to exclude (case-insensitive) | |
| include_tests | No | Include test/spec nodes in results. Default false (test/spec excluded). | |
| ast_only_tuning | No | AST-only tuning: true enables AST-only noise suppression, false disables it, omitted = auto | |
| exclude_relations | No | Optional relation filters to exclude during traversal/rendering, e.g. ['imports'] | |
| include_relations | No | Optional relation filters to include during traversal/rendering, e.g. ['calls', 'uses'] | |
| generated_code_mode | No | Generated-like code filter: 'include' (default), 'exclude', or 'only' |