本文件由
gen_api_docs.sh从方法注册表生成(v0.0.1,共 31 个方法),禁止手改;新增方法后重新执行生成。
管理方法统一注册在 Supported Methods Registry,并由 APIExecuter 完成 scope 门禁后调用
Ability。MCP Adapter 使用 tools/call → name → arguments;资源化 HTTP Adapter
把 /api/* 路由映射为相同的方法名和 arguments。下面是 MCP 调用示例:
{
"jsonrpc": "2.0",
"id": "request-id",
"method": "tools/call",
"params": {
"name": "models.list",
"arguments": {}
}
}MCP 已注册 tool 的业务结果统一返回 CallToolResult,并显式输出 isError;
协议损坏或未知 tool 使用 MCP/JSON-RPC 协议错误。HTTP Adapter 使用 HTTP 状态表达认证、
参数和业务错误,但仍执行同一个注册项。
方法节怎么读:每个方法节给出方法语义、arguments 传参举例(必填字段的
实际请求形态,占位值按真实值替换)与 arguments JSON Schema(机器可校验的
约束说明——required 数组表示「哪些字段必填」,properties 内是各字段
类型与长度约束;schema 本身不是请求体的一部分,不要照抄进请求)。
| error_code | error_msg |
|---|---|
| 0 | 成功 |
| 10001 | method not found |
| 10002 | method is not supported |
| 10003 | invalid arguments |
| 10004 | permission denied |
检查统一 API 调用链是否可用
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"type": "object"
}列出已注册模型
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}扫描模型目录
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}读取模型
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}注册 Hugging Face 模型
arguments 传参举例(仅含必填字段):
{
"repository": "<repository>"
}可选字段:revision。
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"repository": {
"type": "string"
},
"revision": {
"type": "string"
}
},
"required": [
"repository"
],
"type": "object"
}注册本地模型
arguments 传参举例(仅含必填字段):
{
"name": "<name>",
"path": "<path>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"name",
"path"
],
"type": "object"
}删除模型
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}可选字段:files。
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"files": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}列出 NVIDIA GPU 状态
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}列出下载任务
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}从已登记模型启动下载
异步方法:受理后返回 task_id,进度与结果经任务查询方法读取。
arguments 传参举例(仅含必填字段):
{
"id": "<id>",
"model_id": "<model_id>"
}可选字段:token。
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"id",
"model_id"
],
"type": "object"
}读取下载状态
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}读取下载日志
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}取消下载
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}重试下载
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}可选字段:token。
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}读取 vLLM Runtime 状态
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}启动 vLLM Runtime
arguments 传参举例(仅含必填字段):
{
"options": "<options>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"options": {
"type": "object"
}
},
"required": [
"options"
],
"type": "object"
}重启 vLLM Runtime
arguments 传参举例(仅含必填字段):
{
"options": "<options>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"options": {
"type": "object"
}
},
"required": [
"options"
],
"type": "object"
}切换活动模型
arguments 传参举例(仅含必填字段):
{
"model_id": "<model_id>",
"options": "<options>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"model_id": {
"type": "string"
},
"options": {
"type": "object"
}
},
"required": [
"model_id",
"options"
],
"type": "object"
}停止 vLLM Runtime
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}创建 API Key
arguments 传参举例(仅含必填字段):
{
"scopes": "<scopes>"
}可选字段:name。
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"scopes"
],
"type": "object"
}列出 API Key
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}启用 API Key
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}禁用 API Key
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}删除 API Key
arguments 传参举例(仅含必填字段):
{
"id": "<id>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}读取设置
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}更新非敏感设置(凭据必须通过环境变量或 CLI flags 提供)
arguments 传参举例(仅含必填字段):
{
"settings": "<settings>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"settings": {
"items": {
"additionalProperties": false,
"properties": {
"key": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"value": {
"maxLength": 65536,
"type": "string"
}
},
"required": [
"key",
"value"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"settings"
],
"type": "object"
}删除非敏感设置
arguments 传参举例(仅含必填字段):
{
"key": "<key>"
}arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"key": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
}读取最近请求
arguments 传参举例(仅含必填字段):
{}可选字段:limit。
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {
"limit": {
"maximum": 500,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}读取系统信息
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}读取 MCP 状态
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}读取管理面板摘要
arguments JSON Schema(约束说明,非请求体;required 数组 = 必填字段清单):
{
"additionalProperties": false,
"properties": {},
"type": "object"
}