Graph
graph
GraphTool — import dependency graph.
GraphTool
Bases: AXMTool
Import dependency graph with text/mermaid/json output.
Registered as ast_graph via axm.tools entry point.
Workspace-aware: if path is a uv workspace root, returns
inter-package dependency graph.
Source code in packages/axm-ast/src/axm_ast/tools/graph.py
name
property
Return tool name for registry lookup.
execute(*, path='.', format='json', **kwargs)
Generate import dependency graph.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to package or workspace directory. |
'.'
|
format
|
str
|
Output format — 'json', 'mermaid', or 'text'. |
'json'
|
Returns:
| Type | Description |
|---|---|
ToolResult
|
ToolResult with graph data. |