{ "name": "cloudbase-mcp", "version": "1.8.1", "description": "腾讯云开发 MCP Server,支持静态托管/环境查询/云函数/云数据库等功能", "tools": [ { "name": "auth", "description": "CloudBase(腾讯云开发)开发阶段登录与环境绑定。登录后即可访问云资源;环境(env)是云函数、数据库、静态托管等资源的隔离单元,绑定环境后其他 MCP 工具才能操作该环境。支持:查询状态、发起登录、绑定环境(set_env)、退出登录。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "status", "start_auth", "set_env", "logout" ], "description": "动作:status=查询状态,start_auth=发起登录,set_env=绑定环境(传envId),logout=退出登录" }, "authMode": { "type": "string", "enum": [ "device", "web" ], "description": "认证模式:device=设备码授权,web=浏览器回调授权" }, "oauthEndpoint": { "type": "string", "description": "高级可选:自定义 device-code 登录 endpoint。配置后 oauthCustom 默认按 true 处理" }, "clientId": { "type": "string", "description": "高级可选:自定义 device-code 登录 client_id,不传则使用默认值" }, "oauthCustom": { "type": "boolean", "description": "高级可选:自定义 endpoint 返回格式开关。未配置 endpoint 时默认 false;配置 endpoint 后默认 true,且不能设为 false" }, "envId": { "type": "string", "description": "环境ID(CloudBase 环境唯一标识),绑定后工具将操作该环境。action=set_env 时必填" }, "confirm": { "type": "string", "const": "yes", "description": "action=logout 时确认操作,传 yes" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "envQuery", "description": "查询云开发环境相关信息,支持查询环境列表、当前环境信息、安全域名和静态网站托管配置。(原工具名:listEnvs/getEnvInfo/getEnvAuthDomains/getWebsiteConfig,为兼容旧AI规则可继续使用这些名称)当 action=list 时,标准返回字段为 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault,并支持通过 fields 白名单裁剪这些字段;aliasExact=true 时会按别名精确筛选,避免把前缀相近的环境误当作候选;即使传入 envId,action=list 也只返回摘要,不会返回完整资源明细或 expiry。如需查询某个已知环境的详细信息,请使用 action=info。action=info 会在可用时补充 BillingInfo(如 ExpireTime、PayMode、IsAutoRenew 等计费字段)。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "list", "info", "domains", "hosting" ], "description": "查询类型:list=环境列表/摘要筛选(即使传 envId 也只返回 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault,不支持 expiry),info=当前环境详细信息(详情中可查看更完整资源字段),domains=安全域名列表,hosting=静态网站托管配置" }, "alias": { "type": "string", "description": "按环境别名筛选。action=list 时可选" }, "aliasExact": { "type": "boolean", "description": "按环境别名精确筛选。action=list 时可选;与 alias 配合使用" }, "envId": { "type": "string", "description": "按环境 ID 精确筛选。action=list 时可选;注意 list + envId 仍只返回摘要,如需该环境详情请改用 action=info" }, "limit": { "type": "integer", "exclusiveMinimum": 0, "description": "返回数量上限。action=list 时可选" }, "offset": { "type": "integer", "minimum": 0, "description": "分页偏移。action=list 时可选" }, "fields": { "type": "array", "items": { "type": "string", "enum": [ "EnvId", "Alias", "Status", "EnvType", "Region", "PackageId", "PackageName", "IsDefault" ] }, "description": "返回字段白名单。仅支持 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault。action=list 时可选" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "envDomainManagement", "description": "管理云开发环境的安全域名,支持添加和删除操作。(原工具名:createEnvDomain/deleteEnvDomain,为兼容旧AI规则可继续使用这些名称)", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "create", "delete" ], "description": "操作类型:create=添加域名,delete=删除域名" }, "domains": { "type": "array", "items": { "type": "string" }, "description": "安全域名数组" } }, "required": [ "action", "domains" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "readNoSqlDatabaseStructure", "description": "读取 NoSQL 数据库结构", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "listCollections", "describeCollection", "checkCollection", "listIndexes", "checkIndex" ], "description": "listCollections: 列出集合列表\ndescribeCollection: 描述集合\ncheckCollection: 检查集合是否存在\nlistIndexes: 列出索引列表\ncheckIndex: 检查索引是否存在" }, "limit": { "type": "number", "description": "返回数量限制(listCollections 操作时可选)" }, "offset": { "type": "number", "description": "偏移量(listCollections 操作时可选)" }, "collectionName": { "type": "string", "description": "集合名称(describeCollection、listIndexes、checkIndex 操作时必填)" }, "indexName": { "type": "string", "description": "索引名称(checkIndex 操作时必填)" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "writeNoSqlDatabaseStructure", "description": "修改 NoSQL 数据库结构", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "createCollection", "updateCollection", "deleteCollection" ], "description": "createCollection: 创建集合\nupdateCollection: 更新集合\ndeleteCollection: 删除集合" }, "collectionName": { "type": "string", "description": "集合名称" }, "updateOptions": { "type": "object", "properties": { "CreateIndexes": { "type": "array", "items": { "type": "object", "properties": { "IndexName": { "type": "string" }, "MgoKeySchema": { "type": "object", "properties": { "MgoIsUnique": { "type": "boolean" }, "MgoIndexKeys": { "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string" }, "Direction": { "type": "string" } }, "required": [ "Name", "Direction" ], "additionalProperties": false } } }, "required": [ "MgoIsUnique", "MgoIndexKeys" ], "additionalProperties": false } }, "required": [ "IndexName", "MgoKeySchema" ], "additionalProperties": false } }, "DropIndexes": { "type": "array", "items": { "type": "object", "properties": { "IndexName": { "type": "string" } }, "required": [ "IndexName" ], "additionalProperties": false } } }, "additionalProperties": false, "description": "更新选项(updateCollection 时使用)" } }, "required": [ "action", "collectionName" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "readNoSqlDatabaseContent", "description": "查询并获取 NoSQL 数据库数据记录", "inputSchema": { "type": "object", "properties": { "collectionName": { "type": "string", "description": "集合名称" }, "query": { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": true }, { "type": "string" } ], "description": "查询条件(对象或字符串,推荐对象)" }, "projection": { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": true }, { "type": "string" } ], "description": "返回字段投影(对象或字符串,推荐对象)" }, "sort": { "anyOf": [ { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "description": "sort 字段名" }, "direction": { "type": "number", "description": "排序方向,1:升序,-1:降序" } }, "required": [ "key", "direction" ], "additionalProperties": true } }, { "type": "string" } ], "description": "排序条件,使用对象或字符串。" }, "limit": { "type": "number", "description": "返回数量限制" }, "offset": { "type": "number", "description": "跳过的记录数" } }, "required": [ "collectionName" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "writeNoSqlDatabaseContent", "description": "修改 NoSQL 数据库数据记录。可按 MongoDB updateOne/updateMany 的心智模型理解:部分更新必须使用 $set/$inc/$push 等更新操作符;如果直接传 { field: value } 这类普通对象,底层会把它当作替换内容,存在覆盖整条文档的风险。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "insert", "update", "delete" ], "description": "insert: 插入数据(新增文档)\nupdate: 更新数据\ndelete: 删除数据" }, "collectionName": { "type": "string", "description": "集合名称" }, "documents": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true }, "description": "要插入的文档对象数组,每个文档都是对象(insert 操作必填)" }, "query": { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": true }, { "type": "string" } ], "description": "查询条件(对象或字符串,推荐对象)(update/delete 操作必填)" }, "update": { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": true }, { "type": "string" } ], "description": "更新内容(对象或字符串,推荐对象)(update 操作必填)。按 MongoDB 更新语义传入 MgoUpdate:部分更新请使用 $set/$inc/$unset/$push 等操作符,例如 { \"$set\": { \"status\": \"pending\" } };不要直接传 { \"status\": \"pending\" },否则可能替换整条文档。" }, "isMulti": { "type": "boolean", "description": "是否更新多条记录(update/delete 操作可选)" }, "upsert": { "type": "boolean", "description": "是否在不存在时插入(update 操作可选)" } }, "required": [ "action", "collectionName" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "querySqlDatabase", "description": "Query SQL database information. Supports read-only SQL execution, MySQL provisioning result lookup, MySQL task status lookup, and current instance context discovery.", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "runQuery", "describeCreateResult", "describeTaskStatus", "getInstanceInfo" ], "description": "runQuery=execute read-only SQL; describeCreateResult=query CreateMySQL result; describeTaskStatus=query MySQL task status; getInstanceInfo=get current SQL instance context" }, "sql": { "type": "string", "description": "Read-only SQL used by action=runQuery" }, "request": { "type": "object", "additionalProperties": {}, "description": "Official request payload used by describeCreateResult/describeTaskStatus" }, "dbInstance": { "type": "object", "properties": { "instanceId": { "type": "string" }, "schema": { "type": "string" } }, "additionalProperties": false, "description": "Optional SQL database instance context for runQuery" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "manageSqlDatabase", "description": "Manage SQL database resources. Supports MySQL provisioning, MySQL destruction, write SQL/DDL execution, and schema initialization after the instance becomes ready.", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "provisionMySQL", "destroyMySQL", "runStatement", "initializeSchema" ], "description": "provisionMySQL=create MySQL instance; destroyMySQL=destroy MySQL instance; runStatement=execute write SQL or DDL; initializeSchema=run ordered schema initialization statements" }, "confirm": { "type": "boolean", "description": "Explicit confirmation required for action=provisionMySQL or action=destroyMySQL" }, "sql": { "type": "string", "description": "SQL statement used by action=runStatement" }, "request": { "type": "object", "additionalProperties": {}, "description": "Official request payload used by action=provisionMySQL or action=destroyMySQL" }, "statements": { "type": "array", "items": { "type": "string" }, "description": "Ordered schema initialization SQL statements used by action=initializeSchema" }, "requireReady": { "type": "boolean", "description": "Whether initializeSchema should block until MySQL is confirmed ready. Defaults to true." }, "statusContext": { "type": "object", "properties": { "createResultRequest": { "type": "object", "additionalProperties": {} }, "taskStatusRequest": { "type": "object", "additionalProperties": {} } }, "additionalProperties": false, "description": "Optional provisioning status requests used to confirm readiness before initializeSchema" }, "dbInstance": { "type": "object", "properties": { "instanceId": { "type": "string" }, "schema": { "type": "string" } }, "additionalProperties": false, "description": "Optional SQL database instance context for runStatement/initializeSchema" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "manageDataModel", "description": "数据模型查询工具,支持查询和列表数据模型(只读操作)。通过 action 参数区分操作类型:list=获取模型列表(不含Schema,可选 names 参数过滤),get=查询单个模型详情(含Schema字段列表、格式、关联关系等,需要提供 name 参数),docs=生成SDK使用文档(需要提供 name 参数)", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "get", "list", "docs" ], "description": "操作类型:get=查询单个模型(含Schema字段列表、格式、关联关系,需要提供 name 参数),list=获取模型列表(不含Schema,可选 names 参数过滤),docs=生成SDK使用文档(需要提供 name 参数)" }, "name": { "type": "string", "description": "要查询的数据模型名称。当 action='get' 或 action='docs' 时,此参数为必填项,必须提供已存在的数据模型名称。可通过 action='list' 操作获取可用的模型名称列表" }, "names": { "type": "array", "items": { "type": "string" }, "description": "模型名称数组(list操作时可选,用于过滤)" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "modifyDataModel", "description": "基于Mermaid classDiagram创建或更新数据模型。支持创建新模型和更新现有模型结构。内置异步任务监控,自动轮询直至完成或超时。", "inputSchema": { "type": "object", "properties": { "mermaidDiagram": { "type": "string", "description": "Mermaid classDiagram代码,描述数据模型结构。\n示例:\nclassDiagram\n class Student {\n name: string <<姓名>>\n age: number = 18 <<年龄>>\n gender: x-enum = \"男\" <<性别>>\n classId: string <<班级ID>>\n identityId: string <<身份ID>>\n course: Course[] <<课程>>\n required() [\"name\"]\n unique() [\"name\"]\n enum_gender() [\"男\", \"女\"]\n display_field() \"name\"\n }\n class Class {\n className: string <<班级名称>>\n display_field() \"className\"\n }\n class Course {\n name: string <<课程名称>>\n students: Student[] <<学生>>\n display_field() \"name\"\n }\n class Identity {\n number: string <<证件号码>>\n display_field() \"number\"\n }\n\n %% 关联关系\n Student \"1\" --> \"1\" Identity : studentId\n Student \"n\" --> \"1\" Class : student2class\n Student \"n\" --> \"m\" Course : course\n Student \"n\" <-- \"m\" Course : students\n %% 类的命名\n note for Student \"学生模型\"\n note for Class \"班级模型\"\n note for Course \"课程模型\"\n note for Identity \"身份模型\"\n" }, "action": { "type": "string", "enum": [ "create" ], "default": "create", "description": "操作类型:create=创建新模型" }, "publish": { "type": "boolean", "default": false, "description": "是否立即发布模型" }, "dbInstanceType": { "type": "string", "default": "MYSQL", "description": "数据库实例类型" } }, "required": [ "mermaidDiagram" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "queryFunctions", "description": "函数域统一只读入口。通过更自解释的 action 查询函数列表、函数详情、日志、层、触发器和代码下载地址。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "listFunctions", "getFunctionDetail", "listFunctionLogs", "getFunctionLogDetail", "listFunctionLayers", "listLayers", "listLayerVersions", "getLayerVersionDetail", "listFunctionTriggers", "getFunctionDownloadUrl" ], "description": "只读操作类型,例如 listFunctions、getFunctionDetail、listFunctionLogs" }, "functionName": { "type": "string", "description": "函数名称。函数相关 action 必填" }, "limit": { "type": "number", "description": "分页数量。列表类 action 可选" }, "offset": { "type": "number", "description": "分页偏移。列表类 action 可选" }, "codeSecret": { "type": "string", "description": "代码保护密钥" }, "startTime": { "type": "string", "description": "日志查询开始时间" }, "endTime": { "type": "string", "description": "日志查询结束时间" }, "requestId": { "type": "string", "description": "日志 requestId。获取日志详情时必填" }, "qualifier": { "type": "string", "description": "函数版本,日志查询时可选" }, "runtime": { "type": "string", "description": "层查询的运行时筛选" }, "searchKey": { "type": "string", "description": "层名称搜索关键字" }, "layerName": { "type": "string", "description": "层名称。层相关 action 必填" }, "layerVersion": { "type": "number", "description": "层版本号。获取层版本详情时必填" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "manageFunctions", "description": "函数域统一写入口。通过 action 管理函数创建、代码更新、配置更新、触发器和层绑定。危险操作需要显式 confirm=true。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "createFunction", "updateFunctionCode", "updateFunctionConfig", "invokeFunction", "createFunctionTrigger", "deleteFunctionTrigger", "createLayerVersion", "deleteLayerVersion", "attachLayer", "detachLayer", "updateFunctionLayers" ], "description": "写操作类型,例如 createFunction、updateFunctionCode、attachLayer" }, "func": { "type": "object", "properties": { "name": { "type": "string", "description": "函数名称" }, "type": { "type": "string", "enum": [ "Event", "HTTP" ], "description": "函数类型" }, "protocolType": { "type": "string", "enum": [ "HTTP", "WS" ], "description": "HTTP 云函数协议类型" }, "protocolParams": { "type": "object", "properties": { "wsParams": { "type": "object", "properties": { "idleTimeOut": { "type": "number", "description": "WebSocket 空闲超时时间(秒)" } }, "additionalProperties": false } }, "additionalProperties": false }, "instanceConcurrencyConfig": { "type": "object", "properties": { "dynamicEnabled": { "type": "boolean" }, "maxConcurrency": { "type": "number" } }, "additionalProperties": false }, "timeout": { "type": "number", "description": "函数超时时间" }, "envVariables": { "type": "object", "additionalProperties": { "type": "string" }, "description": "环境变量" }, "vpc": { "type": "object", "properties": { "vpcId": { "type": "string" }, "subnetId": { "type": "string" } }, "required": [ "vpcId", "subnetId" ], "additionalProperties": false, "description": "私有网络配置" }, "runtime": { "type": "string", "description": "运行时环境。Event 函数支持多种运行时:\n Nodejs: Nodejs20.19, Nodejs18.15, Nodejs16.13, Nodejs14.18, Nodejs12.16, Nodejs10.15, Nodejs8.9\n Python: Python3.10, Python3.9, Python3.7, Python3.6, Python2.7\n Php: Php8.0, Php7.4, Php7.2\n Java: Java8, Java11\n Golang: Golang1\n\n推荐运行时:\n Node.js: Nodejs18.15\n Python: Python3.9\n PHP: Php7.4\n Java: Java11\n Go: Golang1" }, "triggers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "触发器名称" }, "type": { "type": "string", "enum": [ "timer" ], "description": "触发器类型" }, "config": { "type": "string", "description": "触发器配置,timer 使用 7 段 cron:second minute hour day month week year" } }, "required": [ "name", "type", "config" ], "additionalProperties": false }, "description": "触发器配置数组" }, "handler": { "type": "string", "description": "函数入口" }, "ignore": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ], "description": "忽略文件" }, "isWaitInstall": { "type": "boolean", "description": "是否等待依赖安装" }, "layers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "number" } }, "required": [ "name", "version" ], "additionalProperties": false }, "description": "Layer 配置" } }, "required": [ "name" ], "additionalProperties": false, "description": "createFunction 操作的函数配置" }, "functionRootPath": { "type": "string", "description": "函数根目录(父目录绝对路径)" }, "force": { "type": "boolean", "description": "createFunction 时是否覆盖" }, "functionName": { "type": "string", "description": "函数名称。大多数 action 使用该字段作为统一目标" }, "zipFile": { "type": "string", "description": "代码包的 base64 编码" }, "handler": { "type": "string", "description": "函数入口" }, "timeout": { "type": "number", "description": "配置更新时的超时时间" }, "envVariables": { "type": "object", "additionalProperties": { "type": "string" }, "description": "配置更新时要合并的环境变量" }, "vpc": { "$ref": "#/properties/func/properties/vpc", "description": "配置更新时的 VPC 信息" }, "params": { "type": "object", "additionalProperties": {}, "description": "invokeFunction 的调用参数" }, "triggers": { "type": "array", "items": { "$ref": "#/properties/func/properties/triggers/items" }, "description": "createFunctionTrigger 的触发器列表" }, "triggerName": { "type": "string", "description": "deleteFunctionTrigger 的目标触发器名称" }, "layerName": { "type": "string", "description": "层名称" }, "layerVersion": { "type": "number", "description": "层版本号" }, "contentPath": { "type": "string", "description": "层内容路径,可为目录或 ZIP 文件" }, "base64Content": { "type": "string", "description": "层内容的 base64 编码" }, "runtimes": { "type": "array", "items": { "type": "string" }, "description": "层适用的运行时列表" }, "description": { "type": "string", "description": "层版本描述" }, "licenseInfo": { "type": "string", "description": "层许可证信息" }, "layers": { "type": "array", "items": { "type": "object", "properties": { "layerName": { "type": "string", "description": "层名称" }, "layerVersion": { "type": "number", "description": "层版本号" } }, "required": [ "layerName", "layerVersion" ], "additionalProperties": false }, "description": "updateFunctionLayers 的目标层列表,顺序即最终顺序" }, "codeSecret": { "type": "string", "description": "层绑定时的代码保护密钥" }, "confirm": { "type": "boolean", "description": "危险操作确认开关" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "uploadFiles", "description": "上传文件到静态网站托管,仅用于 Web 站点部署,不用于云存储对象上传。部署前请先完成构建;如果站点会部署到子路径,请检查构建配置中的 publicPath、base、assetPrefix 等是否使用相对路径,避免静态资源加载失败。若需要上传 COS 云存储文件,请使用 manageStorage。", "inputSchema": { "type": "object", "properties": { "localPath": { "type": "string", "description": "本地文件或文件夹路径,需要是绝对路径,例如 /tmp/files/data.txt。" }, "cloudPath": { "type": "string", "description": "静态托管云端文件或文件夹路径,例如 files/data.txt。若部署到子路径,请同时检查构建配置中的 publicPath、base、assetPrefix 等是否为相对路径。云存储对象路径请改用 manageStorage。" }, "files": { "type": "array", "items": { "type": "object", "properties": { "localPath": { "type": "string" }, "cloudPath": { "type": "string" } }, "required": [ "localPath", "cloudPath" ], "additionalProperties": false }, "default": [], "description": "多文件上传配置" }, "ignore": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ], "description": "忽略文件模式" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "deleteFiles", "description": "删除静态网站托管的文件或文件夹", "inputSchema": { "type": "object", "properties": { "cloudPath": { "type": "string", "description": "云端文件或文件夹路径" }, "isDir": { "type": "boolean", "default": false, "description": "是否为文件夹" } }, "required": [ "cloudPath" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "findFiles", "description": "搜索静态网站托管的文件", "inputSchema": { "type": "object", "properties": { "prefix": { "type": "string", "description": "匹配前缀" }, "marker": { "type": "string", "description": "起始对象键标记" }, "maxKeys": { "type": "number", "description": "单次返回最大条目数" } }, "required": [ "prefix" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "domainManagement", "description": "统一的域名管理工具,支持绑定、解绑、查询和修改域名配置", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "create", "delete", "check", "modify" ], "description": "操作类型: create=绑定域名, delete=解绑域名, check=查询域名配置, modify=修改域名配置" }, "domain": { "type": "string", "description": "域名" }, "certId": { "type": "string", "description": "证书ID(绑定域名时必需)" }, "domains": { "type": "array", "items": { "type": "string" }, "description": "域名列表(查询配置时使用)" }, "domainId": { "type": "number", "description": "域名ID(修改配置时必需)" }, "domainConfig": { "type": "object", "properties": { "Refer": { "type": "object", "properties": { "Switch": { "type": "string" }, "RefererRules": { "type": "array", "items": { "type": "object", "properties": { "RefererType": { "type": "string" }, "Referers": { "type": "array", "items": { "type": "string" } }, "AllowEmpty": { "type": "boolean" } }, "required": [ "RefererType", "Referers", "AllowEmpty" ], "additionalProperties": false } } }, "required": [ "Switch" ], "additionalProperties": false }, "Cache": { "type": "array", "items": { "type": "object", "properties": { "RuleType": { "type": "string" }, "RuleValue": { "type": "string" }, "CacheTtl": { "type": "number" } }, "required": [ "RuleType", "RuleValue", "CacheTtl" ], "additionalProperties": false } }, "IpFilter": { "type": "object", "properties": { "Switch": { "type": "string" }, "FilterType": { "type": "string" }, "Filters": { "type": "array", "items": { "type": "string" } } }, "required": [ "Switch" ], "additionalProperties": false }, "IpFreqLimit": { "type": "object", "properties": { "Switch": { "type": "string" }, "Qps": { "type": "number" } }, "required": [ "Switch" ], "additionalProperties": false } }, "additionalProperties": false, "description": "域名配置(修改配置时使用)" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "queryStorage", "description": "查询云存储信息,支持列出目录文件、获取文件信息、获取临时下载链接等只读操作。返回的文件信息包括文件名、大小、修改时间、下载链接等。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "list", "info", "url" ], "description": "查询操作类型:list=列出目录下的所有文件,info=获取指定文件的详细信息,url=获取文件的临时下载链接" }, "cloudPath": { "type": "string", "description": "云端文件路径,例如 files/data.txt 或 files/(目录)" }, "maxAge": { "type": "number", "minimum": 1, "maximum": 86400, "default": 3600, "description": "临时链接有效期,单位为秒,取值范围:1-86400,默认值:3600(1小时)" } }, "required": [ "action", "cloudPath" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "manageStorage", "description": "管理云存储文件,仅用于 COS/Storage 对象,不用于静态网站托管。支持上传文件/目录、下载文件/目录、删除文件/目录等操作。删除操作需要设置force=true进行确认,防止误删除重要文件。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "upload", "download", "delete" ], "description": "管理操作类型:upload=上传文件或目录,download=下载文件或目录,delete=删除文件或目录" }, "localPath": { "type": "string", "description": "本地文件路径,建议传入绝对路径,例如 /tmp/files/data.txt" }, "cloudPath": { "type": "string", "description": "云端文件路径,例如 files/data.txt" }, "force": { "type": "boolean", "default": false, "description": "强制操作开关,删除操作时建议设置为true以确认删除,默认false" }, "isDirectory": { "type": "boolean", "default": false, "description": "是否为目录操作,true=目录操作,false=文件操作,默认false" } }, "required": [ "action", "localPath", "cloudPath" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "downloadTemplate", "description": "自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️\n\n**CRITICAL**: This tool MUST be called FIRST when starting a new project.\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置\n- cursor: Cursor AI编辑器\n- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:2.15.3),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)", "inputSchema": { "type": "object", "properties": { "template": { "type": "string", "enum": [ "react", "vue", "miniprogram", "uniapp", "rules" ], "description": "要下载的模板类型" }, "ide": { "type": "string", "enum": [ "all", "cursor", "windsurf", "codebuddy", "claude-code", "cline", "gemini-cli", "opencode", "qwen-code", "baidu-comate", "openai-codex-cli", "augment-code", "github-copilot", "roocode", "tongyi-lingma", "trae", "qoder", "antigravity", "vscode", "kiro", "aider", "iflow-cli" ], "description": "指定要下载的IDE类型。" }, "overwrite": { "type": "boolean", "description": "是否覆盖已存在的文件,默认为false(不覆盖)" } }, "required": [ "template", "ide" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "searchWeb", "description": "使用联网来进行信息检索,如查询最新的新闻、文章、股价、天气等。支持自然语言查询,也可以直接输入网址获取网页内容", "inputSchema": { "type": "object", "properties": { "query": { "type": "string", "description": "搜索关键词、问题或网址,支持自然语言" } }, "required": [ "query" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "searchKnowledgeBase", "description": "云开发知识库智能检索工具,支持向量查询 (vector)、固定技能文档 (skill) 和 OpenAPI 文档 (openapi) 查询。\n\n 强烈推荐始终优先使用固定技能文档 (skill) 或 OpenAPI 文档 (openapi) 模式进行检索,仅当固定技能文档无法覆盖你的问题时,再使用向量查询 (vector) 模式。\n\n 固定技能文档 (skill) 查询当前支持 22 个固定文档,分别是:\n 文档名:ai-model-nodejs 文档介绍:Use this skill when developing Node.js backend services or CloudBase cloud functions (Express/Koa/NestJS, serverless, backend APIs) that need AI capabilities. Features text generation (generateText), streaming (streamText), AND image generation (generateImage) via @cloudbase/node-sdk ≥3.16.0. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended), DeepSeek (deepseek-v3.2 recommended), and hunyuan-image for images. This is the ONLY SDK that supports image generation. NOT for browser/Web apps (use ai-model-web) or WeChat Mini Program (use ai-model-wechat).\n文档名:ai-model-web 文档介绍:Use this skill when developing browser/Web applications (React/Vue/Angular, static websites, SPAs) that need AI capabilities. Features text generation (generateText) and streaming (streamText) via @cloudbase/js-sdk. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). NOT for Node.js backend (use ai-model-nodejs), WeChat Mini Program (use ai-model-wechat), or image generation (Node SDK only).\n文档名:ai-model-wechat 文档介绍:Use this skill when developing WeChat Mini Programs (小程序, 企业微信小程序, wx.cloud-based apps) that need AI capabilities. Features text generation (generateText) and streaming (streamText) with callback support (onText, onEvent, onFinish) via wx.cloud.extend.AI. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). API differs from JS/Node SDK - streamText requires data wrapper, generateText returns raw response. NOT for browser/Web apps (use ai-model-web), Node.js backend (use ai-model-nodejs), or image generation (not supported).\n文档名:auth-http-api 文档介绍:Use when you need to implement CloudBase Auth v2 over raw HTTP endpoints (login/signup, tokens, user operations) from backends or scripts that are not using the Web or Node SDKs.\n文档名:auth-nodejs 文档介绍:Complete guide for CloudBase Auth using the CloudBase Node SDK – caller identity, user lookup, custom login tickets, and server-side best practices.\n文档名:auth-tool 文档介绍:Use CloudBase Auth tool to configure and manage authentication providers for web applications - enable/disable login methods (SMS, Email, WeChat Open Platform, Google, Anonymous, Username/password, OAuth, SAML, CAS, Dingding, etc.) and configure provider settings via MCP tools `callCloudApi`.\n文档名:auth-web 文档介绍:CloudBase Web Authentication Quick Guide - Provides concise and practical Web frontend authentication solutions with multiple login methods and complete user management.\n文档名:auth-wechat 文档介绍:Complete guide for WeChat Mini Program authentication with CloudBase - native login, user identity, and cloud function integration.\n文档名:cloud-functions 文档介绍:Complete guide for CloudBase cloud functions development - runtime selection, deployment, logging, invocation, and HTTP access configuration.\n文档名:cloud-storage-web 文档介绍:Complete guide for CloudBase cloud storage using Web SDK (@cloudbase/js-sdk) - upload, download, temporary URLs, file management, and best practices.\n文档名:cloudbase-platform 文档介绍:CloudBase platform knowledge and best practices. Use this skill for general CloudBase platform understanding, including storage, hosting, authentication, cloud functions, database permissions, and data models.\n文档名:cloudrun-development 文档介绍:CloudBase Run backend development rules (Function mode/Container mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, or AI agent development.\n文档名:data-model-creation 文档介绍:Optional advanced tool for complex data modeling. For simple table creation, use relational-database-tool directly with SQL statements.\n文档名:http-api 文档介绍:Use CloudBase HTTP API to access CloudBase platform features (database, authentication, cloud functions, cloud hosting, cloud storage, AI) via HTTP protocol from backends or scripts that are not using SDKs.\n文档名:miniprogram-development 文档介绍:WeChat Mini Program development rules. Use this skill when developing WeChat mini programs, integrating CloudBase capabilities, and deploying mini program projects.\n文档名:no-sql-web-sdk 文档介绍:Use CloudBase document database Web SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.\n文档名:no-sql-wx-mp-sdk 文档介绍:Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.\n文档名:relational-database-tool 文档介绍:This is the required documentation for agents operating on the CloudBase Relational Database. It lists the only four supported tools for running SQL and managing security rules. Read the full content to understand why you must NOT use standard Application SDKs and how to safely execute INSERT, UPDATE, or DELETE operations without corrupting production data.\n文档名:relational-database-web 文档介绍:Use when building frontend Web apps that talk to CloudBase Relational Database via @cloudbase/js-sdk – provides the canonical init pattern so you can then use Supabase-style queries from the browser.\n文档名:spec-workflow 文档介绍:Standard software engineering workflow for requirement analysis, technical design, and task planning. Use this skill when developing new features, complex architecture designs, multi-module integrations, or projects involving database/UI design.\n文档名:ui-design 文档介绍:Professional UI design and frontend interface guidelines. Use this skill when creating web pages, mini-program interfaces, prototypes, or any frontend UI components that require distinctive, production-grade design with exceptional aesthetic quality.\n文档名:web-development 文档介绍:Web frontend project development rules. Use this skill when developing web frontend pages, deploying static hosting, and integrating CloudBase Web SDK.\n\n OpenAPI 文档 (openapi) 查询当前支持 5 个 API 文档,分别是:\n API名:mysqldb API介绍:MySQL RESTful API - 云开发 MySQL 数据库 HTTP API\nAPI名:functions API介绍:Cloud Functions API - 云函数 HTTP API\nAPI名:auth API介绍:Authentication API - 身份认证 HTTP API\nAPI名:cloudrun API介绍:CloudRun API - 云托管服务 HTTP API\nAPI名:storage API介绍:Storage API - 云存储 HTTP API", "inputSchema": { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "vector", "skill", "openapi" ] }, "skillName": { "type": "string", "enum": [ "ai-model-nodejs", "ai-model-web", "ai-model-wechat", "auth-http-api", "auth-nodejs", "auth-tool", "auth-web", "auth-wechat", "cloud-functions", "cloud-storage-web", "cloudbase-platform", "cloudrun-development", "data-model-creation", "http-api", "miniprogram-development", "no-sql-web-sdk", "no-sql-wx-mp-sdk", "relational-database-tool", "relational-database-web", "spec-workflow", "ui-design", "web-development" ], "description": "mode=skill 时指定。技能名称。" }, "apiName": { "type": "string", "enum": [ "mysqldb", "functions", "auth", "cloudrun", "storage" ], "description": "mode=openapi 时指定。API 名称。" }, "threshold": { "type": "number", "default": 0.5, "description": "mode=vector 时指定。相似性检索阈值" }, "id": { "type": "string", "enum": [ "cloudbase", "scf", "miniprogram" ], "default": "cloudbase", "description": "mode=vector 时指定。知识库范围,默认 cloudbase。cloudbase=云开发全量知识,scf=云开发的云函数知识, miniprogram=小程序知识(不包含云开发与云函数知识)" }, "content": { "type": "string", "description": "mode=vector 时指定。检索内容" }, "options": { "type": "object", "properties": { "chunkExpand": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2, "default": [ 3, 3 ], "description": "指定返回的文档内容的展开长度,例如 [3,3]代表前后展开长度" } }, "additionalProperties": false, "description": "mode=vector 时指定。其他选项" }, "limit": { "type": "number", "default": 5, "description": "mode=vector 时指定。指定返回最相似的 Top K 的 K 的值" } }, "required": [ "mode" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "queryCloudRun", "description": "查询云托管服务信息,支持获取服务列表、查询服务详情和获取可用模板列表。返回的服务信息包括服务名称、状态、访问类型、配置详情等。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "list", "detail", "templates" ], "description": "查询操作类型:list=获取云托管服务列表(支持分页和筛选),detail=查询指定服务的详细信息(包括配置、版本、访问地址等),templates=获取可用的项目模板列表(用于初始化新项目)" }, "pageSize": { "type": "number", "minimum": 1, "maximum": 100, "default": 10, "description": "分页大小,控制每页返回的服务数量。取值范围:1-100,默认值:10。建议根据网络性能和显示需求调整" }, "pageNum": { "type": "number", "minimum": 1, "default": 1, "description": "页码,用于分页查询。从1开始,默认值:1。配合pageSize使用可实现分页浏览" }, "serverName": { "type": "string", "description": "服务名称筛选条件,支持模糊匹配。例如:输入\"test\"可匹配\"test-service\"、\"my-test-app\"等服务名称。留空则查询所有服务" }, "serverType": { "type": "string", "enum": [ "function", "container" ], "description": "服务类型筛选条件:function=函数型云托管(仅支持Node.js,有特殊的开发要求和限制,适合简单的API服务),container=容器型服务(推荐使用,支持任意语言和框架如Java/Go/Python/PHP/.NET等,适合大多数应用场景)" }, "detailServerName": { "type": "string", "description": "要查询详细信息的服务名称。当action为detail时必需提供,必须是已存在的服务名称。可通过list操作获取可用的服务名称列表" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "manageCloudRun", "description": "管理云托管服务,按开发顺序支持:初始化项目(可从模板开始,模板列表可通过 queryCloudRun 查询)、下载服务代码、本地运行(仅函数型服务)、部署代码、删除服务。部署可配置CPU、内存、实例数、访问类型等参数。删除操作需要确认,建议设置force=true。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "init", "download", "run", "deploy", "delete", "createAgent" ], "description": "云托管服务管理操作类型:init=从模板初始化新的云托管项目代码(在targetPath目录下创建以serverName命名的子目录,支持多种语言和框架模板),download=从云端下载现有服务的代码到本地进行开发,run=在本地运行函数型云托管服务(用于开发和调试,仅支持函数型服务),deploy=将本地代码部署到云端云托管服务(支持函数型和容器型),delete=删除指定的云托管服务(不可恢复,需要确认),createAgent=创建函数型Agent(基于函数型云托管开发AI智能体)" }, "serverName": { "type": "string", "description": "云托管服务名称,用于标识和管理服务。命名规则:支持大小写字母、数字、连字符和下划线,必须以字母开头,长度3-45个字符。在init操作中会作为在targetPath下创建的子目录名,在其他操作中作为目标服务名" }, "targetPath": { "type": "string", "description": "本地代码路径,必须是绝对路径。在deploy操作中指定要部署的代码目录,在download操作中指定下载目标目录,在init操作中指定云托管服务的上级目录(会在该目录下创建以serverName命名的子目录)。建议约定:项目根目录下的cloudrun/目录,例如:/Users/username/projects/my-project/cloudrun" }, "serverConfig": { "type": "object", "properties": { "OpenAccessTypes": { "type": "array", "items": { "type": "string", "enum": [ "OA", "PUBLIC", "MINIAPP", "VPC" ] }, "description": "公网访问类型配置,控制服务的访问权限:OA=办公网访问,PUBLIC=公网访问(默认,可通过HTTPS域名访问),MINIAPP=小程序访问,VPC=VPC访问(仅同VPC内可访问)。可配置多个类型" }, "Cpu": { "type": "number", "exclusiveMinimum": 0, "description": "CPU规格配置,单位为核。可选值:0.25、0.5、1、2、4、8等。注意:内存规格必须是CPU规格的2倍(如CPU=0.25时内存=0.5,CPU=1时内存=2)。影响服务性能和计费" }, "Mem": { "type": "number", "exclusiveMinimum": 0, "description": "内存规格配置,单位为GB。可选值:0.5、1、2、4、8、16等。注意:必须是CPU规格的2倍。影响服务性能和计费" }, "MinNum": { "type": "number", "minimum": 0, "description": "最小实例数配置,控制服务的最小运行实例数量。设置为0时支持缩容到0(无请求时不产生费用),设置为大于0时始终保持指定数量的实例运行(确保快速响应但会增加成本)。建议设置为1以降低冷启动延迟,提升用户体验" }, "MaxNum": { "type": "number", "minimum": 1, "description": "最大实例数配置,控制服务的最大运行实例数量。当请求量增加时,服务最多可以扩展到指定数量的实例,超过此数量后将拒绝新的请求。建议根据业务峰值设置" }, "PolicyDetails": { "type": "array", "items": { "type": "object", "properties": { "PolicyType": { "type": "string", "enum": [ "cpu", "mem", "cpu/mem" ], "description": "扩缩容类型:cpu=基于CPU使用率扩缩容,mem=基于内存使用率扩缩容,cpu/mem=基于CPU和内存使用率扩缩容" }, "PolicyThreshold": { "type": "number", "minimum": 1, "maximum": 100, "description": "扩缩容阈值,单位为百分比。如60表示当资源使用率达到60%时触发扩缩容" } }, "required": [ "PolicyType", "PolicyThreshold" ], "additionalProperties": false }, "description": "扩缩容配置数组,用于配置服务的自动扩缩容策略。可配置多个扩缩容策略" }, "CustomLogs": { "type": "string", "description": "自定义日志配置,用于配置服务的日志收集和存储策略" }, "Port": { "type": "number", "minimum": 1, "maximum": 65535, "description": "服务监听端口配置。函数型服务固定为3000,容器型服务可自定义。服务代码必须监听此端口才能正常接收请求" }, "EnvParams": { "type": "string", "description": "环境变量配置,JSON字符串格式。用于传递配置信息给服务代码,如'{\"DATABASE_URL\":\"mysql://...\",\"NODE_ENV\":\"production\"}'。敏感信息建议使用环境变量而非硬编码" }, "Dockerfile": { "type": "string", "description": "Dockerfile文件名配置,仅容器型服务需要。指定用于构建容器镜像的Dockerfile文件路径,默认为项目根目录下的Dockerfile" }, "BuildDir": { "type": "string", "description": "构建目录配置,指定代码构建的目录路径。当代码结构与标准不同时使用,默认为项目根目录" }, "InternalAccess": { "type": "string", "description": "内网访问开关配置,控制是否启用内网访问。true=启用内网访问(可通过云开发SDK直接调用),false=关闭内网访问(仅公网访问)" }, "InternalDomain": { "type": "string", "description": "内网域名配置,用于配置服务的内网访问域名。仅在启用内网访问时有效" }, "EntryPoint": { "type": "array", "items": { "type": "string" }, "description": "Dockerfile EntryPoint参数配置,仅容器型服务需要。指定容器启动时的入口程序数组,如[\"node\",\"app.js\"]" }, "Cmd": { "type": "array", "items": { "type": "string" }, "description": "Dockerfile Cmd参数配置,仅容器型服务需要。指定容器启动时的默认命令数组,如[\"npm\",\"start\"]" } }, "additionalProperties": false, "description": "服务配置项,用于部署时设置服务的运行参数。包括资源规格、访问权限、环境变量等配置。不提供时使用默认配置" }, "template": { "type": "string", "default": "helloworld", "description": "项目模板标识符,用于指定初始化项目时使用的模板。可通过queryCloudRun的templates操作获取可用模板列表。常用模板:helloworld=Hello World示例,nodejs=Node.js项目模板,python=Python项目模板等" }, "runOptions": { "type": "object", "properties": { "port": { "type": "number", "minimum": 1, "maximum": 65535, "default": 3000, "description": "本地运行端口配置,仅函数型服务有效。指定服务在本地运行时监听的端口号,默认3000。确保端口未被其他程序占用" }, "envParams": { "type": "object", "additionalProperties": { "type": "string" }, "description": "本地运行时的附加环境变量配置,用于本地开发和调试。格式为键值对,如{\"DEBUG\":\"true\",\"LOG_LEVEL\":\"debug\"}。这些变量仅在本地运行时生效" }, "runMode": { "type": "string", "enum": [ "normal", "agent" ], "default": "normal", "description": "运行模式:normal=普通函数模式,agent=Agent模式(用于AI智能体开发)" }, "agentId": { "type": "string", "description": "Agent ID,在agent模式下使用,用于标识特定的Agent实例" } }, "additionalProperties": false, "description": "本地运行参数配置,仅函数型云托管服务支持。用于配置本地开发环境的运行参数,不影响云端部署" }, "agentConfig": { "type": "object", "properties": { "agentName": { "type": "string", "description": "Agent名称,用于生成BotId" }, "botTag": { "type": "string", "description": "Bot标签,用于生成BotId,不提供时自动生成" }, "description": { "type": "string", "description": "Agent描述信息" }, "template": { "type": "string", "default": "blank", "description": "Agent模板类型,默认为blank(空白模板)" } }, "required": [ "agentName" ], "additionalProperties": false, "description": "Agent配置项,仅在createAgent操作时使用" }, "force": { "type": "boolean", "default": false, "description": "强制操作开关,用于跳过确认提示。默认false(需要确认),设置为true时跳过所有确认步骤。删除操作时强烈建议设置为true以避免误操作" }, "serverType": { "type": "string", "enum": [ "function", "container" ], "description": "服务类型配置:function=函数型云托管(仅支持Node.js,有特殊的开发要求和限制,适合简单的API服务),container=容器型服务(推荐使用,支持任意语言和框架如Java/Go/Python/PHP/.NET等,适合大多数应用场景)。不提供时自动检测:1)现有服务类型 2)有Dockerfile→container 3)有@cloudbase/aiagent-framework依赖→function 4)其他情况→container" } }, "required": [ "action", "serverName" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "queryGateway", "description": "网关域统一只读入口。通过 action 查询网关域名、访问入口和目标暴露情况。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "getAccess", "listDomains" ], "description": "只读操作类型,例如 getAccess、listDomains" }, "targetType": { "type": "string", "enum": [ "function" ], "description": "目标资源类型。当前支持 function,后续可扩展" }, "targetName": { "type": "string", "description": "目标资源名称。getAccess 时必填" } }, "required": [ "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "manageGateway", "description": "网关域统一写入口。通过 action 创建目标访问入口,后续承接更通用的网关配置能力。", "inputSchema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "createAccess" ], "description": "写操作类型,例如 createAccess" }, "targetType": { "type": "string", "enum": [ "function" ], "description": "目标资源类型。当前支持 function,后续可扩展" }, "targetName": { "type": "string", "description": "目标资源名称" }, "path": { "type": "string", "description": "访问路径,默认 /{targetName}" }, "type": { "type": "string", "enum": [ "Event", "HTTP" ], "description": "函数接入类型" }, "auth": { "type": "boolean", "description": "是否开启鉴权" } }, "required": [ "action", "targetType", "targetName" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "downloadRemoteFile", "description": "下载远程文件到项目根目录下的指定相对路径。例如:小程序的 Tabbar 等素材图片,必须使用 **png** 格式,可以从 Unsplash、wikimedia【一般选用 500 大小即可、Pexels、Apple 官方 UI 等资源中选择来下载。", "inputSchema": { "type": "object", "properties": { "url": { "type": "string", "description": "远程文件的 URL 地址" }, "relativePath": { "type": "string", "description": "相对于项目根目录的路径,例如:'assets/images/logo.png' 或 'docs/api.md'。不允许使用 ../ 等路径遍历操作。" } }, "required": [ "url", "relativePath" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "readSecurityRule", "description": "读取指定资源(noSQL 数据库、SQL 数据库、云函数、存储桶)的安全规则和权限类别。\n\n安全规则文档:\n- 云函数安全规则:https://docs.cloudbase.net/cloud-function/security-rules\n- 存储安全规则:https://docs.cloudbase.net/storage/security-rules\n- 文档型数据库安全规则:https://docs.cloudbase.net/database/security-rules", "inputSchema": { "type": "object", "properties": { "resourceType": { "type": "string", "enum": [ "noSqlDatabase", "sqlDatabase", "function", "storage" ], "description": "资源类型:noSqlDatabase=noSQL 数据库,sqlDatabase=SQL 数据库,function=云函数,storage=存储桶" }, "resourceId": { "type": "string", "description": "资源唯一标识。noSQL 数据库为集合名,SQL 数据库为表名,云函数为函数名,存储为桶名(完整格式如 '6169-xxx-1257473911',可通过 envQuery action=info 获取 EnvInfo.Storages[].Bucket)。" } }, "required": [ "resourceType", "resourceId" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "writeSecurityRule", "description": "设置指定资源(数据库集合、云函数、存储桶)的安全规则。\n\n安全规则文档:\n- 云函数安全规则:https://docs.cloudbase.net/cloud-function/security-rules\n- 存储安全规则:https://docs.cloudbase.net/storage/security-rules\n- 数据库安全规则:https://docs.cloudbase.net/database/security-rules\n\n云函数安全规则仅支持 aclTag=\"CUSTOM\",rule 字段为 JSON 字符串。例如放开所有访问可设置 rule=\"true\"。", "inputSchema": { "type": "object", "properties": { "resourceType": { "type": "string", "enum": [ "sqlDatabase", "noSqlDatabase", "function", "storage" ], "description": "资源类型:sqlDatabase=SQL 数据库,noSqlDatabase=noSQL 数据库,function=云函数,storage=存储桶" }, "resourceId": { "type": "string", "description": "资源唯一标识。sqlDatabase=表名,noSqlDatabase=集合名,云函数为函数名,存储为桶名(完整格式如 '6169-xxx-1257473911',可通过 envQuery action=info 获取 EnvInfo.Storages[].Bucket)。" }, "aclTag": { "type": "string", "enum": [ "READONLY", "PRIVATE", "ADMINWRITE", "ADMINONLY", "CUSTOM" ], "description": "权限类别" }, "rule": { "anyOf": [ { "type": "string" }, { "type": "object", "additionalProperties": {} } ], "description": "自定义安全规则内容,仅当 aclTag 为 CUSTOM 时必填。可以直接传 JSON 对象,或者传可解析为 JSON 对象的字符串。函数示例:{\n \"*\": {\n \"invoke\": true\n }\n}" } }, "required": [ "resourceType", "resourceId", "aclTag" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "activateInviteCode", "description": "云开发 AI编程激励计划,通过邀请码激活用户激励。", "inputSchema": { "type": "object", "properties": { "InviteCode": { "type": "string", "description": "待激活的邀请码" } }, "required": [ "InviteCode" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "callCloudApi", "description": "通用的云 API 调用工具,主要用于 CloudBase / 腾讯云管控面与依赖资源相关 API 调用。调用前请先确认 service、Action 与 Param,避免猜测 Action 名称。如果你的目标是通过 HTTP 协议直接集成 auth/functions/cloudrun/storage/mysqldb 等 CloudBase 业务 API,请不要优先使用 callCloudApi,而应优先查看对应 OpenAPI / Swagger。现有 OpenAPI / Swagger 能力不是通用的管控面 Action 集合;管控面 API 请优先参考 CloudBase API 概览 https://cloud.tencent.com/document/product/876/34809 与云开发依赖资源接口指引 https://cloud.tencent.com/document/product/876/34808。对于 tcb,可参考类似 `CreateEnv`、`ModifyEnv`、`DestroyEnv` 这类真实 Action 组织请求;销毁环境时,常见做法是至少带上 `EnvId` 和 `BypassCheck: true`,如果环境已经处于隔离期再按文档补 `IsForce: true`。", "inputSchema": { "type": "object", "properties": { "service": { "type": "string", "enum": [ "tcb", "scf", "sts", "cam", "lowcode", "cdn", "vpc" ], "description": "选择要访问的服务。可选:tcb、scf、sts、cam、lowcode、cdn、vpc。对于 tcb / scf / lowcode 等 CloudBase 管控面 Action,请优先查官方文档,不要直接猜测 Action。" }, "action": { "type": "string", "minLength": 1, "description": "具体 Action 名称,需符合对应服务的官方 API 定义。若不确定正确 Action,请先查官方文档;不要用近义词或历史命名进行猜测。对于 tcb,可优先参考 `CreateEnv`、`ModifyEnv`、`DestroyEnv`、`DescribeBillingInfo` 等真实 Action。" }, "params": { "type": "object", "additionalProperties": {}, "description": "Action 对应的参数对象,键名需与官方 API 定义一致。某些 Action 需要携带 EnvId 等信息;如不确定参数结构,请先查官方文档。tcb 示例:`{ \"service\": \"tcb\", \"action\": \"DestroyEnv\", \"params\": { \"EnvId\": \"env-xxx\", \"BypassCheck\": true } }`,如果环境已经处于隔离期,可再补 `IsForce: true`;更新环境别名则可用 `{ \"service\": \"tcb\", \"action\": \"ModifyEnv\", \"params\": { \"EnvId\": \"env-xxx\", \"Alias\": \"demo\" } }`。若你的场景是通过 HTTP 协议直接集成 auth/functions/cloudrun/storage/mysqldb 等 CloudBase 业务 API,请优先使用 OpenAPI / Swagger 或 searchKnowledgeBase(mode=\"openapi\"),而不是优先使用 callCloudApi。" } }, "required": [ "service", "action" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } } ] }