add_tool
Add a new tool to an existing MCP server by generating the required module, service stub, test file, and updating server configuration.
Instructions
Add a new tool to an existing scaffolded MCP server. Pass the project directory and a JSON tool definition. Creates the tool module, service stub, test, and updates server.py.
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": {
"project_dir": "<project_dir>",
"tool": "<tool>"
},
"name": "add_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_dir | Yes | ||
| tool | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |