yapi_interface_save
Save API interfaces to YAPI documentation by creating new entries or updating existing ones with details like endpoints, methods, parameters, and descriptions.
Instructions
保存接口(新增或更新)
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": {
"catid": "<catid>",
"title": "<title>",
"path": "<path>",
"method": "<method>"
},
"name": "yapi_interface_save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | YAPI 接口页面 URL(可选),如 https://yapi.xxx.com/project/1009/interface/api/108375,会自动解析出项目 ID、接口 ID 等参数 | |
| project | No | 项目 ID(可选,不传则使用默认项目) | |
| catid | Yes | 接口分类 ID | |
| id | No | 接口 ID(更新时必填) | |
| title | Yes | 接口名称 | |
| path | Yes | 接口路径 | |
| method | Yes | 请求方法 | |
| desc | No | 接口描述 | |
| status | No | 接口状态 | |
| req_params | No | 路径参数 | |
| req_query | No | 查询参数 | |
| req_headers | No | 请求头 | |
| req_body_type | No | 请求体类型 | |
| req_body_form | No | 表单请求体 | |
| req_body_other | No | 其他请求体 | |
| res_body_type | No | 返回数据类型 | |
| res_body | No | 返回数据 |