query_graph
Explore graph topology, trace upstream/downstream dependencies, run read-only SQL, and retrieve compact task slices to answer relationship queries without aggregated metrics.
Instructions
Query graph topology, neighborhoods, dependency paths, safe read-only SQL queries, and compact System One task slices (actions: subgraph, trace, raw, natural_language, compact_slice). Use query_graph instead of get_analytics when exploring graph topology and path traversals rather than aggregated numerical metrics.
Returns subgraph nodes and edges, upstream/downstream trace path, raw SQL rows, or compact task slice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | Read-only SELECT query for raw action. | |
| depth | No | Maximum depth for subgraph query (1-10). | |
| query | No | Natural language search query for natural_language action. | |
| action | Yes | The graph query action to execute: subgraph, trace, raw, natural_language, compact_slice. | |
| params | No | Query parameters for raw action. | |
| node_id | No | Starting node ID for trace. | |
| project | No | Target project name or slug. | |
| root_id | No | Root node ID for subgraph query. | |
| direction | No | Direction of dependency traversal for trace. | |
| max_depth | No | Maximum traversal depth for trace (1-50). | |
| edge_types | No | Allowed edge types for trace (default: depends_on, blocks, child_of). |