analyze_repo
Compile a Solidity repo and build a call-flow per external entry point, mapping reachable calls with configurable exclusions and interface bindings.
Instructions
Compile a Solidity repo (Foundry/Hardhat/etc. via crytic-compile + Slither) and build one call-flow per external entry point. Returns a summary.
Other tools call this implicitly with defaults, so only call it to (a) change
scope, or (b) recompile after source edits (force=true).
Each call sets the WHOLE scope from defaults + solflow.toml + these arguments;
options and unsaved set_interface_bindings from earlier calls are dropped.
Args:
repo_path: Absolute path to the project root (where foundry.toml etc. lives).
force: Recompile even if cached (needed after editing .sol files).
exclude_paths: Gitignore-style globs; contracts in matching files get no flows.
exclude_contracts: Globs on contract names to exclude (e.g. "*Harness*").
inline_libraries: Names of lib/<NAME>/ dependencies to recurse into instead
of stopping at them (e.g. "openzeppelin-contracts").
stub_paths: Globs for in-tree call targets NOT to recurse into (e.g. dense
math libs: "src/libraries/FullMath.sol").
bindings: Interface -> concrete contract, e.g. {"IOracle": "ChainlinkOracle"},
so calls through the interface are followed into that implementation.
use_default_excludes: Default excludes are tests (*.t.sol, test/, tests/),
mocks/, *Mock* contracts and dependency contracts (lib/, node_modules/,
including such folders outside the repo root). Excluded contracts get no
entry points of their own; project contracts that inherit dependency
code still get those entry points. Set false to include them.
config_path: Optional solflow.toml path (default: <repo>/solflow.toml if present).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo_path": "<repo_path>"
},
"name": "analyze_repo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| bindings | No | ||
| repo_path | Yes | ||
| stub_paths | No | ||
| config_path | No | ||
| exclude_paths | No | ||
| inline_libraries | No | ||
| exclude_contracts | No | ||
| use_default_excludes | No |