一键导入
一键导入
Orchestrates full-program analysis by running block classification, then analyzing all unanalyzed routines and symbols in parallel using subagents.
Analyzes a specific memory address or label to determine its purpose (variable, flag, pointer, hardware register) by examining its cross-references and usage patterns.
Analyzes a disassembly subroutine to determine its function by examining code, cross-references, and memory usage, leveraging target system expertise.
Analyzes memory regions of a disassembled binary and converts them to the correct block types (code, bytes, words, text, tables, etc.) using MOS 6502 and the target system's expertise.
Analyzes a sequence of memory containing Commodore BASIC tokens, formats address/word data types, and constructs side comments representing the plain BASIC commands.
Automates the process of bumping the version and updating the changelog.
| name | add-mcp-tool |
| description | Streamlines the process of adding new tools to the MCP server. |
Use this workflow when adding a new tool to the crates/regenerator2000-core/src/mcp/handler.rs server.
Before writing code, confirm with the user:
r2000_get_memory)address: u16, length: u16)Vec<u8>)list_toolsIn crates/regenerator2000-core/src/mcp/handler.rs:
define_tool! macro or manually add the JSON definition inside the list_tools function.Example:
json!({
"name": "r2000_my_tool",
"description": "Description of what the tool does.",
"inputSchema": {
"type": "object",
"properties": {
"arg1": { "type": "string", "description": "..." }
},
"required": ["arg1"]
}
})
In crates/regenerator2000-core/src/mcp/handler.rs:
handle_tool_call_internal.Example:
"r2000_my_tool" => {
let arg1 = args["arg1"].as_str().ok_or(McpError::InvalidParams("Missing arg1".to_string()))?;
let result = my_tool_impl(app_state, arg1)?;
Ok(json!({ "content": [{ "type": "text", "text": result }] }))
}
In crates/regenerator2000-core/src/mcp/handler.rs (or a sub-module):
[tool_name]_impl.&mut AppState (or &AppState if read-only).Result<Value, McpError> or a specific type.In tests/verify_mcp.py:
test_[tool_name](client).client.rpc("tools/call", { ... }).if __name__ == "__main__": block.verify-mcp skill:
.agent/skills/verify-mcp/scripts/verify.sh
docs/mcp.md exists, update the "Tools" section with the new tool definition.