Run a predefined graph query to explore code relationships. Available patterns: - callers_of: Find functions that call the target - callees_of: Find functions called by the target - imports_of: Find what the target imports - importers_of: Find files that import the target -
(
pattern: str,
target: str,
repo_root: Optional[str] = None,
detail_level: str = "standard",
)
| 214 | |
| 215 | @mcp.tool() |
| 216 | def query_graph_tool( |
| 217 | pattern: str, |
| 218 | target: str, |
| 219 | repo_root: Optional[str] = None, |
| 220 | detail_level: str = "standard", |
| 221 | ) -> dict: |
| 222 | """Run a predefined graph query to explore code relationships. |
| 223 | |
| 224 | Available patterns: |
| 225 | - callers_of: Find functions that call the target |
| 226 | - callees_of: Find functions called by the target |
| 227 | - imports_of: Find what the target imports |
| 228 | - importers_of: Find files that import the target |
| 229 | - children_of: Find nodes contained in a file or class |
| 230 | - tests_for: Find tests for the target |
| 231 | - inheritors_of: Find classes inheriting from the target |
| 232 | - file_summary: Get all nodes in a file |
| 233 | |
| 234 | Args: |
| 235 | pattern: Query pattern name (see above). |
| 236 | target: Node name, qualified name, or file path to query. |
| 237 | repo_root: Repository root path. Auto-detected if omitted. |
| 238 | detail_level: "standard" for full output, "minimal" for compact summary. Default: standard. |
| 239 | """ |
| 240 | return query_graph( |
| 241 | pattern=pattern, target=target, repo_root=_resolve_repo_root(repo_root), |
| 242 | detail_level=detail_level, |
| 243 | ) |
| 244 | |
| 245 | |
| 246 | @mcp.tool() |
nothing calls this directly
no test coverage detected