Appearance
MCP / Skill / Plugin 命令
MCP 管理
MCP(Model Context Protocol)服务为 Agent 提供外部工具和数据源能力。
mcp:list
列出所有 MCP 服务。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | number | 否 | 页码 |
| pageSize | number | 否 | 每页条数 |
| query | string | 否 | 搜索关键词 |
| enabled | boolean | 否 | 按启用状态筛选 |
请求示例:
bash
workova mcp:list返回示例:
json
{
"success": true,
"data": {
"items": [
{
"id": "mcp_abc",
"name": "github-tools",
"transport": "stdio",
"enabled": true
},
{
"id": "mcp_def",
"name": "search-api",
"transport": "streamable_http",
"enabled": false
}
]
}
}mcp:get
获取 MCP 服务详情。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
请求示例:
bash
workova mcp:get --input '{"serverId": "mcp_abc"}'返回示例:
json
{
"success": true,
"data": {
"server": {
"id": "mcp_abc",
"name": "github-tools",
"transport": "stdio",
"command": "npx @mcp/github-tools",
"url": null,
"enabled": true
}
}
}mcp:create
创建 MCP 服务。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| name | string | 是 | 服务名称 |
| transport | string | 是 | 传输方式,可选 stdio / streamable_http |
| command | string | 否 | 启动命令,transport 为 stdio 时必填 |
| args | string[] | 否 | 命令参数列表 |
| url | string | 否 | 服务 URL,transport 为 streamable_http 时必填 |
| headers | object | 否 | HTTP 请求头 |
| env | object | 否 | 环境变量 |
| enabled | boolean | 否 | 是否启用,默认 true |
| tags | string[] | 否 | 标签列表 |
请求示例:
bash
workova mcp:create --input '{"name": "github-tools", "transport": "stdio", "command": "npx @mcp/github-tools"}'返回示例:
json
{
"success": true,
"data": {
"server": {
"id": "mcp_abc",
"name": "github-tools",
"transport": "stdio",
"command": "npx @mcp/github-tools",
"enabled": true
}
}
}mcp:update
更新 MCP 服务。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
| name | string | 否 | 服务名称 |
| transport | string | 否 | 传输方式 |
| command | string | 否 | 启动命令 |
| url | string | 否 | 服务 URL |
| enabled | boolean | 否 | 是否启用 |
请求示例:
bash
workova mcp:update --input '{"serverId": "mcp_abc", "name": "github-tools-v2"}'返回示例:
json
{
"success": true,
"data": {
"server": {
"id": "mcp_abc",
"name": "github-tools-v2",
"transport": "stdio",
"enabled": true
}
}
}mcp:delete
删除 MCP 服务。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
请求示例:
bash
workova mcp:delete --input '{"serverId": "mcp_abc"}'返回示例:
json
{
"success": true,
"data": {
"serverId": "mcp_abc",
"deleted": true
}
}mcp:test
测试 MCP 服务连通性。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
请求示例:
bash
workova mcp:test --input '{"serverId": "mcp_abc"}'返回示例:
json
{
"success": true,
"data": {
"serverId": "mcp_abc",
"ok": true,
"message": null
}
}mcp:connect
连接 MCP 服务(启动进程)。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
请求示例:
bash
workova mcp:connect --input '{"serverId": "mcp_abc"}'返回示例:
json
{
"success": true,
"data": {
"serverId": "mcp_abc",
"connected": true
}
}TIP
mcp:connect 通过 bridge 在桌面端 runtime 中启动 MCP 进程。bridge 不可用时此命令不可执行。
mcp:disconnect
断开 MCP 服务。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
请求示例:
bash
workova mcp:disconnect --input '{"serverId": "mcp_abc"}'返回示例:
json
{
"success": true,
"data": {
"serverId": "mcp_abc",
"disconnected": true
}
}mcp:tools:list
列出 MCP 提供的工具。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
请求示例:
bash
workova mcp:tools:list --input '{"serverId": "mcp_abc"}'返回示例:
json
{
"success": true,
"data": {
"items": [
{
"name": "search_repos",
"description": "Search GitHub repositories",
"inputSchema": {
"type": "object",
"properties": { "query": { "type": "string" } }
}
},
{
"name": "get_file",
"description": "Get file content from a repo",
"inputSchema": {
"type": "object",
"properties": {
"repo": { "type": "string" },
"path": { "type": "string" }
}
}
}
]
}
}mcp:tools:call
调用 MCP 工具。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| serverId | string | 是 | MCP 服务 ID |
| toolName | string | 是 | 工具名称 |
| arguments | object | 否 | 工具调用参数 |
请求示例:
bash
workova mcp:tools:call --input '{"serverId": "mcp_abc", "toolName": "search_repos", "arguments": {"query": "workova"}}'返回示例:
json
{
"success": true,
"data": {
"result": {
"repos": [{ "name": "workova/core", "stars": 1200 }]
}
}
}Skill 管理
Skill 是可复用的能力单元,可绑定到 Agent 以增强其功能。
skill:list
列出所有 Skill。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | number | 否 | 页码 |
| pageSize | number | 否 | 每页条数 |
| query | string | 否 | 搜索关键词 |
| source | string | 否 | 来源筛选,可选 local-path / bundle / marketplace / builtin |
| enabled | boolean | 否 | 按启用状态筛选 |
请求示例:
bash
workova skill:list返回示例:
json
{
"success": true,
"data": {
"items": [
{
"id": "skill_abc",
"name": "web-scraper",
"source": "registry",
"enabled": true
},
{
"id": "skill_def",
"name": "code-analyzer",
"source": "local",
"enabled": true
}
]
}
}skill:get
获取 Skill 详情。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| skillId | string | 是 | Skill ID |
请求示例:
bash
workova skill:get --input '{"skillId": "skill_abc"}'返回示例:
json
{
"success": true,
"data": {
"skill": {
"id": "skill_abc",
"name": "web-scraper",
"source": "registry",
"enabled": true
}
}
}skill:validate
校验 Skill 定义是否合法。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| sourcePath | string | 是 | Skill 定义文件路径 |
| strict | boolean | 否 | 是否严格模式,默认 true |
请求示例:
bash
workova skill:validate --input '{"sourcePath": "./my-skill.json"}'返回示例:
json
{
"success": true,
"data": {
"valid": true,
"issues": [],
"warnings": []
}
}skill:install
从注册表安装 Skill。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| skillSource | string | 是 | Skill 来源标识(如 web-scraper@1.0.0) |
请求示例:
bash
workova skill:install --input '{"skillSource": "web-scraper@1.0.0"}'返回示例:
json
{
"success": true,
"data": {
"skill": {
"id": "skill_abc",
"name": "web-scraper",
"source": "registry",
"enabled": true
}
}
}skill:create
创建自定义 Skill。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| name | string | 是 | Skill 名称 |
| description | string | 是 | Skill 描述 |
| content | string | 是 | Skill 内容 |
请求示例:
bash
workova skill:create --input '{"name": "custom-linter", "description": "Custom linting rules", "content": "..."}'返回示例:
json
{
"success": true,
"data": {
"skill": {
"id": "skill_ghi",
"name": "custom-linter",
"source": "local",
"enabled": true
}
}
}skill:update
更新 Skill。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| skillId | string | 是 | Skill ID |
| name | string | 否 | Skill 名称 |
| description | string | 否 | Skill 描述 |
| version | string | 否 | 版本号 |
| enabled | boolean | 否 | 是否启用 |
| tags | string[] | 否 | 标签列表 |
请求示例:
bash
workova skill:update --input '{"skillId": "skill_abc", "description": "Updated description"}'返回示例:
json
{
"success": true,
"data": {
"skill": {
"id": "skill_abc",
"name": "web-scraper",
"source": "registry",
"enabled": true
}
}
}skill:delete
删除 Skill。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| skillId | string | 是 | Skill ID |
| purge | boolean | 否 | 是否彻底清除,默认 false |
请求示例:
bash
workova skill:delete --input '{"skillId": "skill_abc"}'返回示例:
json
{
"success": true,
"data": {
"skillId": "skill_abc",
"deleted": true
}
}Plugin 管理
Plugin 是扩展 CLI 和桌面端功能的模块,可提供额外命令和能力。
plugin:list
列出已安装的 Plugin。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| kind | string | 否 | 类型筛选,可选 tool / channel / skill |
| source | string | 否 | 来源筛选,可选 workspace / global |
| search | string | 否 | 搜索关键词 |
请求示例:
bash
workova plugin:list --input '{"kind": "tool"}'返回示例:
json
{
"success": true,
"data": {
"plugins": [
{
"pluginId": "plugin_abc",
"name": "github-integration",
"kind": "tool",
"enabled": true
},
{
"pluginId": "plugin_def",
"name": "slack-notifier",
"kind": "tool",
"enabled": false
}
],
"count": 2
}
}plugin:info
查看 Plugin 详情。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| pluginId | string | 是 | Plugin ID |
请求示例:
bash
workova plugin:info --input '{"pluginId": "plugin_abc"}'返回示例:
json
{
"success": true,
"data": {
"plugin": {
"manifest": {
"name": "github-integration",
"version": "1.2.0",
"description": "GitHub integration for Workova"
},
"commands": ["gh:pr-list", "gh:issue-create"]
}
}
}plugin:install
安装 Plugin。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| source | string | 是 | 来源,目录路径或 manifest 路径 |
| target | string | 否 | 安装目标,可选 workspace / global,默认 workspace |
| enabled | boolean | 否 | 是否启用,默认 true |
请求示例:
bash
workova plugin:install --input '{"source": "github-integration", "target": "workspace"}'返回示例:
json
{
"success": true,
"data": {
"plugin": {
"pluginId": "plugin_abc",
"name": "github-integration",
"kind": "tool",
"enabled": true
}
}
}plugin:uninstall
卸载 Plugin。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| pluginId | string | 是 | Plugin ID |
请求示例:
bash
workova plugin:uninstall --input '{"pluginId": "plugin_abc"}'返回示例:
json
{
"success": true,
"data": {
"pluginId": "plugin_abc",
"removed": true
}
}plugin:enable
启用 Plugin。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| pluginId | string | 是 | Plugin ID |
请求示例:
bash
workova plugin:enable --input '{"pluginId": "plugin_abc"}'返回示例:
json
{
"success": true,
"data": {
"plugin": {
"pluginId": "plugin_abc",
"name": "github-integration",
"enabled": true
}
}
}plugin:disable
禁用 Plugin。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| pluginId | string | 是 | Plugin ID |
请求示例:
bash
workova plugin:disable --input '{"pluginId": "plugin_abc"}'返回示例:
json
{
"success": true,
"data": {
"plugin": {
"pluginId": "plugin_abc",
"name": "github-integration",
"enabled": false
}
}
}plugin:commands
查看 Plugin 提供的命令。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| pluginId | string | 是 | Plugin ID |
请求示例:
bash
workova plugin:commands --input '{"pluginId": "plugin_abc"}'返回示例:
json
{
"success": true,
"data": {
"commands": ["gh:pr-list", "gh:issue-create", "gh:repo-search"],
"count": 3
}
}plugin:validate
校验 Plugin manifest 完整性。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| manifestPath | string | 是 | manifest 文件路径 |
请求示例:
bash
workova plugin:validate --input '{"manifestPath": "./plugin-manifest.json"}'返回示例:
json
{
"success": true,
"data": {
"valid": true,
"manifest": {
"name": "github-integration",
"version": "1.2.0"
}
}
}WARNING
Plugin 的安装和启用需要重启 CLI 或桌面端才能生效。