docs(mcp_client+ai_client): correct tool counts (15->18, 45->46)
- Total tool count: 45 -> 46 (per src/models.py:AGENT_TOOL_NAMES) - Python AST tools: 15 -> 18 (3 structural mutators added: py_remove_def, py_add_def, py_move_def, py_region_wrap) - py_get_symbol_info is fictional; replaced with the 4 actual structural mutator tools - Cross-link from guide_ai_client.md updated
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# `src/mcp_client.py` — MCP Tools (45 tools, 3-layer security)
|
||||
# `src/mcp_client.py` — MCP Tools (46 tools, 3-layer security)
|
||||
|
||||
[Top](../Readme.md) | [Architecture](guide_architecture.md) | [Tools & IPC](guide_tools.md) | [Testing](guide_testing.md)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
`src/mcp_client.py` (~81KB) is the **MCP (Model Context Protocol) tool implementation** for Manual Slop. It provides 45 tools that the AI can invoke to read/write files, analyze code structure, search symbols, and more.
|
||||
`src/mcp_client.py` (~81KB) is the **MCP (Model Context Protocol) tool implementation** for Manual Slop. It provides 46 tools that the AI can invoke to read/write files, analyze code structure, search symbols, and more. The canonical list lives in `models.AGENT_TOOL_NAMES` (`src/models.py:58`).
|
||||
|
||||
The module implements the **client side** of MCP — it provides the tools that an AI model can call during a conversation. It also implements the project's strict filesystem security model.
|
||||
|
||||
@@ -117,13 +117,12 @@ The tools are organized by category. The full registered count is 45.
|
||||
| `set_file_slice` | `path`, `start_line`, `end_line`, `new_content` | Replaces a line range with new content |
|
||||
| `edit_file` | `path`, `old_string`, `new_string`, `replace_all` | Exact string match replace. Preserves indentation. |
|
||||
|
||||
### Python AST Tools (15)
|
||||
### Python AST Tools (18)
|
||||
|
||||
| Tool | Parameters | Description |
|
||||
|---|---|---|
|
||||
| `py_get_skeleton` | `path` | Skeleton: signatures + docstrings, bodies replaced with `...` |
|
||||
| `py_get_code_outline` | `path` | Hierarchical outline: classes, functions, methods with line ranges |
|
||||
| `py_get_symbol_info` | `path`, `name` | (source, line_number) for a class/function/method |
|
||||
| `py_get_definition` | `path`, `name` | Full source for a class/function/method |
|
||||
| `py_update_definition` | `path`, `name`, `new_content` | Surgical replacement (locates via ast, delegates to set_file_slice) |
|
||||
| `py_get_signature` | `path`, `name` | Just the `def` line through the colon |
|
||||
@@ -131,8 +130,15 @@ The tools are organized by category. The full registered count is 45.
|
||||
| `py_get_class_summary` | `path`, `name` | Class docstring + method signatures |
|
||||
| `py_get_var_declaration` | `path`, `name` | Module/class-level variable assignment line(s) |
|
||||
| `py_set_var_declaration` | `path`, `name`, `new_declaration` | Surgical variable replacement |
|
||||
| `py_get_hierarchy` | `path`, `class_name` | Subclasses of a given class |
|
||||
| `py_get_docstring` | `path`, `name` | Docstring for module/class/function |
|
||||
| `py_find_usages` | `path`, `name` | All references to a symbol in a file/dir |
|
||||
| `py_get_imports` | `path` | AST-derived dependency list (modules, froms, names) |
|
||||
| `py_check_syntax` | `path` | Quick syntax check via `ast.parse()` |
|
||||
| `py_get_hierarchy` | `path`, `class_name` | Subclasses of a given class |
|
||||
| `py_remove_def` | `path`, `name` | AST-derived line-range excision of a class/function |
|
||||
| `py_add_def` | `path`, `name`, `new_content`, `anchor_type`, `anchor_symbol` | Inserts a new definition at a specific anchor |
|
||||
| `py_move_def` | `src_path`, `dest_path`, `name`, `dest_name`, `anchor_type`, `anchor_symbol` | Relocates a definition within/across files |
|
||||
| `py_region_wrap` | `path`, `start_line`, `end_line`, `region_name` | Wraps a block in `#region: Name` / `#endregion: Name` |
|
||||
| `py_get_imports` | `path` | AST-parsed dependency list |
|
||||
| `py_find_usages` | `path`, `name` | Exact string match search |
|
||||
| `py_check_syntax` | `path` | Syntax validation via `ast.parse()` |
|
||||
|
||||
Reference in New Issue
Block a user