create_api
Creates a new API endpoint with specified path, method, and script. Automatically creates missing groups and returns the ID and runPath.
Instructions
创建接口。自动建立缺失分组。返回 id 与完整运行路径 runPath。
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": {
"path": "<path>",
"method": "<method>",
"name": "<name>",
"group": "<group>",
"script": "<script>"
},
"name": "create_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 接口路径,如 /detail | |
| method | Yes | HTTP 方法,如 GET/POST | |
| name | Yes | ||
| group | Yes | 分组名(不存在则自动创建) | |
| script | Yes | magic-script 脚本 | |
| description | No |