yapi_create_interface
Create a new API interface in a YApi project, placing it in the specified category or the default public category when none is given. Set the method, path, title, and optional mock response.
Instructions
在指定 YApi 项目新建接口。需要登录账号。不传 catId 时优先用「公共分类」,否则用第一个分类。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| desc | No | ||
| path | Yes | 接口路径,例如 /mcp/ping | |
| catId | No | 分类 ID,可省略 | |
| title | Yes | 接口标题,例如 MCP测试接口 ping | |
| dryRun | No | ||
| method | No | 默认 GET | |
| catName | No | 分类名称,例如 公共分类 | |
| resBody | No | 可选,新建后写入的 Mock 返回体 JSON 字符串 | |
| projectId | No | ||
| resBodyType | No | ||
| resBodyIsJsonSchema | No |