diff --git a/docs/guide_tools.md b/docs/guide_tools.md index 73af33fd..60689fad 100644 --- a/docs/guide_tools.md +++ b/docs/guide_tools.md @@ -54,7 +54,7 @@ The error message includes the full list of allowed base directories for debuggi ## Native Tool Inventory -The `dispatch` function (line 806) is a flat if/elif chain mapping 26 tool names to implementations. All tools are categorized below with their parameters and behavior. +The `dispatch` function (`mcp_client.py:1341`) is a flat if/elif chain mapping 45 tool names to implementations. All tools are categorized below with their parameters and behavior. The count grew from the original 26 as Python structural tools (Phase 6) and C/C++ AST tools (Phase 6.5) were added; Beads tools (4) were added for the Beads mode integration. ### File I/O Tools @@ -65,6 +65,7 @@ The `dispatch` function (line 806) is a flat if/elif chain mapping 26 tool names | `search_files` | `path`, `pattern` | Glob pattern matching within an allowed directory. Applies blacklist filter. | | `get_file_slice` | `path`, `start_line`, `end_line` | Returns specific line range (1-based, inclusive) | | `set_file_slice` | `path`, `start_line`, `end_line`, `new_content` | Replaces a line range with new content (surgical edit) | +| `edit_file` | `path`, `old_string`, `new_string`, `replace_all` | Replaces an exact string match in a file. Preserves indentation and line endings. Drop-in replacement for the legacy native edit tool. | | `get_tree` | `path`, `max_depth` | Directory structure up to `max_depth` levels | ### AST-Based Tools (Python only) @@ -130,6 +131,7 @@ resolved = FuzzyAnchor.resolve_slice(modified_content, slice_data) |---|---|---| | `get_file_summary` | `path` | Heuristic summary via `summarize.py`: imports, classes, functions, constants for `.py`; table keys for `.toml`; headings for `.md`. | | `get_git_diff` | `path`, `base_rev`, `head_rev` | Git diff output for a file or directory. | +| `derive_code_path` | `target`, `max_depth` | Recursively traces the execution path of a specific function or method across multiple files. Returns a multi-level call graph. | ### Network Tools @@ -144,6 +146,21 @@ resolved = FuzzyAnchor.resolve_slice(modified_content, slice_data) |---|---|---| | `get_ui_performance` | (none) | Returns FPS, Frame Time, CPU, Input Lag via injected `perf_monitor_callback`. No security check (no filesystem access). | +### Beads Tools + +These tools wrap the [Beads](https://github.com/steveyegge/beads) Dolt-backed issue tracker. They are dispatched by `mcp_client.dispatch` (line 1474) when the tool name starts with `bd_`. If no active Beads workspace is detected, all Beads tools return `"ERROR: no active workspace to run beads tools."` + +| Tool | Parameters | Description | +|---|---|---| +| `bd_list` | (none) | Lists all beads in the active `.beads/` repository. Returns `ID: , Status: , Title: ` per row. | +| `bd_create` | `title`, `description` | Creates a new bead in the active repository. | +| `bd_update` | `bead_id`, `status` | Updates the status of an existing bead (`open`, `in_progress`, `closed`, etc.). | +| `bd_ready` | (none) | Lists beads that are ready to be worked on (dependencies satisfied, not blocked). | + +The `BeadsClient` is instantiated per-call from `_primary_base_dir` of the MCP allowlist. The dispatch layer requires the base directory to be the project root (where `.beads/` lives). + +See [guide_beads.md](guide_beads.md) (placeholder; written in Task 10) for the full Beads client API and the integration roadmap. + ### Tool Implementation Patterns **AST-based read tools** follow this pattern: