yapi-create-interface
Create new API interfaces in YAPI by specifying title, path, method, and category, with options for request/response parameters, headers, and body schemas.
Instructions
新增 YAPI 接口
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": {
"title": "<title>",
"path": "<path>",
"method": "<method>",
"catid": "<catid>"
},
"name": "yapi-create-interface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | 接口标题 | |
| path | Yes | 接口路径,如 /api/user | |
| method | Yes | 请求方法 | |
| catid | Yes | 分类ID | |
| desc | No | 接口描述 | |
| status | No | 接口状态 | |
| req_body_type | No | 请求体类型 | |
| req_body_other | No | 请求体 JSON Schema | |
| req_body_form | No | 表单字段列表 | |
| req_headers | No | 请求头列表 | |
| req_params | No | 路径参数列表 | |
| req_query | No | Query 参数列表 | |
| res_body_type | No | 响应体类型 | |
| res_body | No | 响应体 JSON Schema |