{
  "version": 1,
  "entries": {
    "75e878c762909dbc36e1e2100bdd0291": [
      {
        "name": "tdrive.search_file",
        "description": "按文件名/目录名关键词匹配（标题级，不读正文）。必须指定 dir_id 限定搜索范围。用本工具：按名字/扩展名找。按内容/语义找用 search_content；已知 dir_id 想枚举其下用 dir_list。"
      },
      {
        "name": "tdrive.search_content",
        "description": "智能聚合搜索：标题 + 正文 + RAG 文搜文 + RAG 文搜图，去重并按相关度排序。翻页把上次返回的 page_token 透传回来，首次不传。用本工具：按内容/语义找、查询是自然语言。按文件名找用 search_file（更轻量）；想枚举某目录用 dir_list；要下载链接用 download。"
      },
      {
        "name": "tdrive.dir_list",
        "description": "列出指定目录下的直接子项（文件 + 子目录），不递归。用本工具：已有 dir_id 想枚举其下内容。按文件名找用 search_file；按内容/语义找用 search_content。"
      },
      {
        "name": "tdrive.dir_create",
        "description": "在指定父目录下创建一个空子目录（仅一层，不创建多级路径），返回新目录的 file_id。用本工具：明确想新建文件夹。上传文件用 file_upload；重命名已有目录用 file_rename；搬目录用 file_move。"
      },
      {
        "name": "tdrive.file_rename",
        "description": "修改文件/目录的显示名称（file_id 与位置都不变）。用本工具：仅改名、不挪位置。要换目录用 file_move（即使顺便改名也优先 move）；删除用 file_delete。"
      },
      {
        "name": "tdrive.file_delete",
        "description": "把文件/目录删除（不可恢复；目录会连同其下所有内容一起删除）。用本工具：明确要删除。仅换目录用 file_move；仅改名用 file_rename。"
      },
      {
        "name": "tdrive.file_upload",
        "description": "申请上传文件到网盘，返回临时上传 URL 和请求头。本工具不传文件内容，拿到返回后必须用 shell 执行 curl PUT 上传本地文件，再调 file_upload_complete 落库，否则网盘不会出现该文件。\n\n上传命令（必须用 -T，让 curl 读取文件流式上传）：\ncurl -sSL -X PUT -H \"K1: V1\" -H \"K2: V2\" -T \"/abs/path/to/file\" \"https://DOMAIN/PATH\"\n\n- URL = \"https://\" + 返回的 domain + path（path 已带 /，勿重复）\n- 返回 headers 的每对 key/value 都用一个 -H 原样传入，勿省略改写\n- -T 后必须是真实存在的本地文件路径\n\n严禁 --data-binary \"/path/to/file\"，这会把路径字符串当 body 上传，curl 返回 0 看似成功但网盘里存的是一段路径文本。如需 --data-binary 必须加 @：--data-binary \"@/path\"。\n\ncurl exit code 0 且 stderr 空即成功，随后用返回的 confirm_key、task_id 调 file_upload_complete。下载用 file_download，建空目录用 dir_create。"
      },
      {
        "name": "tdrive.file_upload_complete",
        "description": "确认文件上传完成，将文件保存到网盘。在调用 file_upload 获取上传地址并通过 curl PUT 完成文件上传后，必须调用本工具确认保存。返回新文件的 file_id。"
      },
      {
        "name": "tdrive.file_download",
        "description": "为网盘已有文件签发临时下载 URL（约 60 分钟有效，请勿长期缓存；不能对目录使用）。⚠️ 重要：本工具只返回 download_url，不会返回文件内容。返回的 download_url 已包含 Token 签名，是一个完整可用的 URL，禁止对其做任何拆分、解析或修改，必须原样使用。获取到 URL 后，通过 shell 执行 curl 下载文件到本地，示例：curl -sSL -o OUTPUT_FILE \"DOWNLOAD_URL\" 将 DOWNLOAD_URL 替换为本工具返回的完整 download_url, OUTPUT_FILE 替换为本地保存路径（含文件名）。-S 显示错误、-s 静默进度、-L 自动跟随重定向（下载链接通常会 302 跳转）、-o 指定输出文件。用本工具：拿文件链接/下载地址。读正文/做内容总结优先 search_content；上传新文件用 file_upload。"
      },
      {
        "name": "tdrive.file_move",
        "description": "把文件/目录搬到另一个已存在的目录下（file_id 不变，原位置不保留）。目标不存在请先 dir_create。用本工具：换目录放。仅改名用 file_rename；上传新文件用 file_upload。"
      }
    ],
    "591ce1c1f3370ad4a9ab4ba0fdef5811": [
      {
        "name": "workbuddy_cloudservice_db_list_tables",
        "description": "列出当前应用云数据库中的全部数据表，含表注释与 RLS 是否开启。只读。"
      },
      {
        "name": "workbuddy_cloudservice_db_describe_table",
        "description": "查询指定数据表的字段定义（类型、可空、默认值、主键）。只读。"
      },
      {
        "name": "workbuddy_cloudservice_db_exec_sql",
        "description": "在当前应用的云数据库执行一条 SQL（PostgreSQL）。mode=read 只读查询、write 数据变更、migrate 建表改表/RLS/GRANT。单次不支持多语句。角色由 mode 推导，不可指定；migrate 走管理员角色**绕过 RLS**。建表 + RLS 是两道独立门（先 GRANT 到 authenticated,anon，再 CREATE POLICY），漏 GRANT 会得到形似策略失效的 42501；写 RLS/建表模式前先读 cloud-service skill 的 database/management.md，勿凭空拼。SQL 含引号/换行等易被转义的字符时，可改用 sqlBase64 传同一条 SQL 的 base64 编码。"
      },
      {
        "name": "workbuddy_cloudservice_db_list_rls",
        "description": "列出当前应用云数据库的全部行级安全（RLS）策略（每条含 table/name/command/roles/using/withCheck）。改 RLS 前先用它看现状，因为 PostgreSQL 无 CREATE POLICY IF NOT EXISTS，需先 DROP POLICY IF EXISTS 才幂等。只读。"
      },
      {
        "name": "workbuddy_cloudservice_user_list_end_users",
        "description": "分页列出当前应用的终端用户（生成应用的登录用户，非 WorkBuddy 用户）。只读，一期不支持禁用/删除/改密。"
      },
      {
        "name": "workbuddy_miniprogram_inspect_virtual_payment",
        "description": "读取当前可信应用的小程序绑定、支付配置脱敏状态、157 授权状态、微信侧开通条件（认证 / 备案 / 服务类目）与下一步动作。只读。"
      },
      {
        "name": "workbuddy_cloudservice_llm_list_models",
        "description": "列出当前应用可用的 AI 模型目录（ID、名称、供应商、上下文窗口、输入/输出上限、模态、能力标识、推理与采样参数建议），用于模型选型与展示参考。只读。enabled=false 或 disabled=true 的模型不可用，不要选择；supportsImages / supportsToolCall / supportsReasoning / onlyReasoning 标识模型能力；reasoning 与 temperature / top_k / top_p / repetition_penalty 是该模型的参数建议，仅在显式给出时供调用代码参考配置；字段缺失不代表模型不支持该参数，不得以缺失为由拒绝传参或改写请求。Chat 的最终模型可用性与参数校验以 ModelHub 实际调用时的判定为准。"
      },
      {
        "name": "workbuddy_cloudservice_storage_list_owners",
        "description": "列出当前应用云存储的顶层归属目录（如 users、shared）。只读。"
      },
      {
        "name": "workbuddy_cloudservice_storage_list_objects",
        "description": "列出当前应用云存储指定路径下的对象与子目录。只读；上传/删除等写操作不在本端点（见 mcp-endpoint.md）。"
      }
    ],
    "f3934781f2c638baf55c36c5f961e3b4": [
      {
        "name": "GetMe",
        "description": "Bootstrap endpoint for agents. Retrieves authentication context including: available email aliases, permission scopes, rate limits (requests per minute/hour, daily send quota), and attachment constraints. Call this first to understand what operations are available."
      },
      {
        "name": "ListMessages",
        "description": "List email messages in a mailbox with pagination and flexible filtering. Supports filtering by: folder (inbox/sent/trash/spam), time range, attachment presence, and read status. Returns message summaries with sender, recipients, subject, snippet, and metadata. Use cursor-based pagination for large result sets."
      },
      {
        "name": "GetMessage",
        "description": "Retrieve full message content and metadata including: subject, sender, all recipients (to/cc/bcc), body (text or HTML), read status, attachment list (metadata only), threading headers (In-Reply-To, References), and original message reference for replies/forwards."
      },
      {
        "name": "SendMessage",
        "description": "Send a new email with support for multiple recipients, CC/BCC , and file attachments.IMPORTANT: This operation requires user confirmation. When you receive a CONFIRMATION_REQUIRED error, you MUST: 1) Display the operation_summary to the user showing what will be sent, 2) Explicitly ask the user to confirm, 3) Only retry with the confirmation_token after receiving user approval. NEVER auto-retry without user consent."
      },
      {
        "name": "ReplyMessage",
        "description": "Reply to an existing email. Automatically sets threading headers (In-Reply-To, References) to maintain conversation context. Supports: reply to sender only or reply-all (includes original recipients), additional CC/BCC, attachments, and plain/HTML formatting. IMPORTANT: Requires user confirmation - see SendMessage for confirmation workflow."
      },
      {
        "name": "ForwardMessage",
        "description": "Forward an existing email to new recipients. Preserves the original message content and optionally includes original attachments. You can add a comment/note at the beginning and attach additional files. IMPORTANT: Requires user confirmation - see SendMessage for confirmation workflow."
      },
      {
        "name": "DeleteMessage",
        "description": "Delete an email by moving it to trash. Messages remain in trash until permanently deleted. IMPORTANT: Requires user confirmation - see SendMessage for confirmation workflow."
      },
      {
        "name": "PermanentDeleteMessage",
        "description": "Permanently delete one email that is already in trash. The request is rejected if the message is not in trash. This operation is irreversible and does not require confirmation."
      },
      {
        "name": "ClearTrash",
        "description": "Permanently delete all messages in trash. This operation is irreversible and requires user confirmation: first call without confirmation_token, show the returned operation summary to the user, then retry with the token only after explicit approval."
      },
      {
        "name": "ListAttachments",
        "description": "List attachment metadata for a specific email without downloading the actual file content. Returns attachment IDs, filenames, MIME types, and file sizes."
      },
      {
        "name": "SearchMessages",
        "description": "Search emails with via the q parameter (matches subject and/or body), sender/recipient filtering, date range, folder, attachment presence, and read status. Returns matching messages with highlighted snippets showing where keywords were found. Use search_in to control search scope: SEARCH_IN_ALL (default, searches subject+body), SEARCH_IN_SUBJECT (subject only), SEARCH_IN_CONTENT (body only). Supports cursor-based pagination for large result sets."
      }
    ],
    "c3b0bc6a879dce73f81144ed686626b0": [
      {
        "name": "library_search",
        "description": "Semantic search over document libraries. Returns the most relevant passages for the given query. The user role follows the caller's permissions; the agent role is strictly limited to resources bound to the agent."
      }
    ],
    "551a2ff30bfa0843cc75631a0d5a429f": [
      {
        "name": "weixinpay_register",
        "description": "智能体使用微信支付，需绑定微信支付AI专属卡。生成绑定链接，引导用户点击链接完成绑定。"
      },
      {
        "name": "weixinpay_feedback",
        "description": "提交微信支付使用问题反馈。当用户反映绑卡/开通/支付等环节异常、报错或\"用不了\"时调用。会打包问题描述与当天运行日志上传，便于排查（仅上传运行诊断信息）。"
      },
      {
        "name": "weixinpay_retry_pay",
        "description": "重新发起微信支付。仅在用户确认要对同一笔订单重新支付后调用，传入该订单上次支付所用的 paymentCode（即 WeixinPay-Required 的值）。本工具本身仅回显支付凭据以重新触发支付，不会重复下单、也不会立即扣款。"
      },
      {
        "name": "weixinpay_pay",
        "description": "发起AI支付。传入 paymentCode，即上游商户工具或服务返回的 WeixinPay-Required 值。"
      }
    ],
    "8ef20a467ce12d76d88938fdc7976e93": [
      {
        "name": "resolve_local_excel",
        "description": "解析本地 Excel 文件的 file_id 与 sheet_list。\n通过 get_pool_status 查询 editorsdk 编辑器池；若文件未打开则自动调用 open_file 打开。\n传入 local_path 时必须是完整绝对路径；每次调用最多执行一次 open_file，失败后直接返回错误，不会尝试或猜测其他路径。\n\n用法：\n  - 传入 local_path → 先 get_pool_status 反查；未命中则 open_file({file_path}) 自动打开，\n    并以 local_path 作为后续 file_id（open_file 内部即以 file_path 作为 editor key）。\n  - 省略 local_path → 解析当前默认 session（file_id=\"_default\"）。\n\n返回：{ file_id, local_path?, sheet_list: [{sheet_id,sheet_name,sheet_rows,sheet_cols}] }"
      },
      {
        "name": "get_cell_ranges",
        "description": "读取若干指定范围内单元格的值。传入 A1 格式的范围引用数组（如 [\"A1:C10\", \"F2\", \"H5:H20\"]，每个元素是单个范围或单元格，不要在一个字符串里写逗号或多段)。返回所有范围内非空单元格合并后的 values（按 A1 地址作 key）。多范围比多次调用更高效。\n单次最多返回约 2000 个单元格（跨所有 ranges 合计），按输入顺序消耗预算；超出预算时从触发上限的 range 起按行边界截断或丢弃，并在响应中标记 truncated + 路由提示。若数据量超限，应通过 run_command 编写 JS 处理脚本在服务端完成处理，避免大量数据进入上下文。"
      },
      {
        "name": "set_cell_range",
        "description": "WRITE. 按 A1 地址映射设置单元格值、公式、样式、边框和超链接，可选批量调整列宽/行高。子表用 sheet_id（子表 ID）或 sheetName（子表名称）指定，任选其一，或两者都传（必须指向同一子表）；已有 sheet_id 时优先传 sheet_id。另传 cells（key 为 A1 地址，value 为单元格数据），样式放在 cellStyles 嵌套对象里。设置超链接用 cells[addr].link（{url, displayText?}，displayText 留空保留原文案；传 null 清除链接；传 displayText 会改写可见文字，按覆盖处理），禁止用 value 硬写 URL 假装设置超链接，那样会覆盖原有文案。不支持顶层 cellStyles/borderStyles；样式和边框必须写在 cells[addr].cellStyles / cells[addr].borderStyles。必须显式设置 allow_overwrite=true 才能写入（无论目标格是否为空、是否只改样式）。若样式写入范围疑似停在 read_table 的截断可见边界，会被 blocked；先补读完整表头/目标行确认业务边界。每格在 value（字面内容，含以 = 开头的纯文本）和 formula（=SUM(...) 等会求值的公式）中二选一。详细字段结构见 prompt §4.2.3，决策树/反模式见 §4.6。"
      },
      {
        "name": "read_table",
        "description": "读取工作表中的表格数据。自动探测表格边界、方向和表头，支持多表格检测。返回结构化的表头与单元格显示值（grid）。这是所有操作的第一步——先了解数据再做修改。\n单元格值以 grid（行主序二维数组）承载：grid[r][c] 对应单元格 (start_row+r, start_col+c)，空位为 null、每行尾部连续 null 已裁剪（缺失尾格视为空）。\n不返回公式与数字格式——需要时改用 get_cell_ranges（include_formulas=true 取公式，include_number_formats=true 取格式）。\n注意：grid 可能只包含部分数据。未截断时 start/end 表示已探测边界；截断时 start/end 只表示本次返回的可见边界。该范围内的单元格可能包含未返回的数据，写入前须先确认目标为空。单个表格最多约 200 个单元格，超出会按行截断并用 has_more / truncated 标记；若 has_more=true，grid 仅为 start_row..shown_end_row 的样本，其后至 end_row 的行内容未返回——不要对未展示行做任何假设，须按 has_more_warning 给出的范围续读后再下结论；若 truncated=true，响应会附带 visible_end_* / actual_end_* / truncation_warning，用于确认完整表头或目标区域。\n表头按方向写到 header_rows / header_cols：\n  - ROW    → header_rows = [banner 行..., 列标题行]，data_start_row 指向第一行数据；\n  - COLUMN → header_cols = [banner 列..., 行标题列]，data_start_col 指向第一列数据；\n  - MATRIX → header_rows = [列标签行]（行标签从 grid 每行首列读取）。\n取列名 / 行名 = header_rows[len-1] / header_cols[len-1]。写入前避开 header 区域（行号 < data_start_row 或列号 < data_start_col）以免覆盖表头。\n需要全量数据时应通过 run_command 在服务端处理，避免大量数据进入上下文。"
      },
      {
        "name": "run_command",
        "description": "执行 Apps-Script 风格的 JavaScript 脚本完成表格操作。脚本在本插件内置的 JS 运行时中执行，\nSpreadsheetApp / Sheet / Range / Utility 等 API 由运行时通过 MCP 原子工具（sheet_set_cell_value 等）映射到上游 sheet-editor。\n适用场景：图表、透视表占位、插入/删除行列、合并、排序、筛选等结构性操作，以及大数据处理。\n跨文件读写：file_id 传写入目标表，secondary_file_ids 传源表 file_id，脚本内用 SpreadsheetApp.openById(源表file_id) 读取，数据不经过模型上下文。\nsheet.getRowHeight(row) / sheet.getColumnWidth(col) 返回值单位为像素(px)；请在向用户展示结果时使用'像素'或'px'作为单位\nsheet.setRowHeight(row, px) / sheet.setColumnWidth(col, px) 入参单位也是像素(px)，有效范围 [10, 1000]。"
      },
      {
        "name": "search_data",
        "description": "在表格中搜索指定文本，返回匹配的单元格位置。\n搜索结果可配合 get_cell_ranges 进行详细分析。\n支持大小写敏感、整单元格匹配、正则表达式、搜索公式等选项。\n默认返回最多50条结果，超出可使用 offset 参数分页获取。"
      },
      {
        "name": "calculate_single_formula",
        "description": "试算单个公式并返回计算结果，不会修改文档内容。\n公式必须以 = 开头（如 =SUM(A1:A10)）。\n必须指定子表（sheet_id 优先，或 sheet_name）；anchor 影响相对引用的计算基准。"
      },
      {
        "name": "calculate_formulas",
        "description": "批量试算多个公式并返回每个公式的计算结果，不会修改文档。适合在大批量 setFormulas / set_cell_range 写入前先 dry-run 一个 anchor 样本，或一次性验证多个 pattern。每个 formula 必须以 = 开头。\n单次最多 100 个公式，每条公式必须指定 sheet_id（推荐）或 sheet_name。实现：单次调用上游 sheet_calculate_formulas，所有公式在一次 roundtrip 内完成评估。"
      },
      {
        "name": "fill_formula",
        "description": "WRITE. 把一条 R1C1 公式按相对引用平移填充矩形区域，类似 Excel/Sheets 的 fill-down。\n示例：anchor=A2, rows=10, formula_r1c1=\"=R[-1]C+RC[1]\" 会在 A2..A11 写入\n  A2: =A1+B2, A3: =A2+B3, ..., A11: =A10+B11\n公式必须以 = 开头。R1C1 语法：R[n]/Rn = 相对/绝对行，C[n]/Cn = 相对/绝对列，RC = 本格，省略 [] 等价 0 偏移。单次最多写入 5000 格。"
      }
    ],
    "a3b60c5a2c8a8e5e27493e678264fe50": [
      {
        "name": "auth",
        "description": "CloudBase（腾讯云开发）开发阶段登录与环境绑定。不确定该从哪开始？先调一次 auth(status)（只读、不用参数），确认登录态和当前环境。登录后即可访问云资源；环境(env)是云函数、数据库、静态托管等资源的隔离单元，绑定环境后其他 MCP 工具才能操作该环境。还没有环境时：国内站新用户可以免费开通一个体验环境，开通后再用 set_env 绑定。支持：查询状态、发起登录、API Key登录、绑定环境(set_env)、退出登录。auth(status) 会返回 credential_scope（account=账号级 / single_env=环境级 API Key）与当前 region；环境级 API Key 只能看到绑定的 envId，查不到其他地域环境是权限边界而非环境不存在。可选 site/region/lang 参数：site=站点(domestic/intl)，region=地域，lang=输出语言(zh/en)。"
      },
      {
        "name": "queryEnv",
        "description": "查询 CloudBase 环境相关信息，支持查询环境列表、指定环境详情、安全域名、资源用量与监控指标。（曾用名：envQuery、listEnvs、getEnvInfo、getEnvAuthDomains）当 action=list 时，会按 DescribeEnvs 语义做列表/筛选，标准返回字段为 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault，并支持通过 fields 白名单裁剪这些字段；aliasExact=true 时会按别名精确筛选，避免把前缀相近的环境误当作候选；即使传入 envId，action=list 也只返回摘要，不会返回完整资源明细或 expiry。账号级登录可传 region（ap-shanghai/ap-guangzhou/ap-singapore）查询对应地域，对齐 CLI `tcb env list -r <region>`；环境级凭证（API Key / 托管授权 token）只能看到绑定的 envId，返回 credential_scope=single_env，此时 region 不参与查询会在 ignored_params 中如实说明（AppliedFilters.region 为 null），不要误判为环境不存在或地域过滤失效。如需查询某个已知 EnvId 对应环境的详细信息（包括资源字段和计费信息），必须使用 action=info 并传入目标环境的 envId 参数。action=info 会在可用时补充 BillingInfo（如 ExpireTime、PayMode、IsAutoRenew 等计费字段）。\n\n📊 action=usage 对齐 tcb env usage/info：透传 Manager SDK describeEnvAccountCircle + describeCreditsUsageDetail，返回计费周期与各模块资源点用量（FLEXDB/SCF/COS 等）。envId 必填；type 可选过滤模块；未传 startDate/endDate 时自动使用当前计费周期。\n\n📈 action=metrics 对齐 TCB DescribeCurveData（manager.monitor.describeCurveData，不是云监控 GetMonitorData）：查询环境/网关 QPS、云函数调用与错误、数据库 CPU/内存/磁盘、云托管 CPU/QPS 等时序。envId 与 metricName 必填；startTime/endTime 格式 YYYY-MM-DD HH:mm:ss，须成对传入，不传则默认最近 24 小时；period 仅 300/3600/86400。GatewayTraceEnvQPS 未传 resourceID 时自动填环境级 all|:|all|:|all|:|all；云托管 Tke* 指标必须传服务名 resourceID。禁止用 callCloudApi 猜测监控 Action。\n\n🔍 action=info 还会派生三个用于后端选型的字段（PG 环境另附实例形态）：\n- `EnvInfo.RuntimeMode`：'postgresql' 或 'nosql'，表示新业务建议默认使用的后端（PG 已开通时为 postgresql，否则为 nosql）。\n- `EnvInfo.RuntimeBackends`：`{postgresql, nosql, mysql}` 三个布尔值，描述当前环境实际并存的后端。\n- `EnvInfo.RuntimeModeHints`：每个后端对应的 API/工具/skill 提示。\n- `EnvInfo.PostgreSQL[].TenantType`：PG 实例形态 —— `SHARED`（仅支持 SDK / 网关访问）或 `DEDICATED`（有私网 host / TCP 直连）。\n\n🌐 action=info 还会在不改写 `StaticStorages[].StaticDomain`（云 API 名义域名）的前提下，投影网关路由 Enable 状态：`StaticStorages[].staticDomainRouteEnabled` 与 `EnvInfo.staticDomainRouteEnabled`（与 queryHosting websiteConfig 同源）。`false` 表示默认静态域名根路由已禁用（访问会返回 GATEWAY_ROUTE_DISABLED），勿把名义域名当成可达 URL。\n\nAI 在写业务/权限/存储代码前必须先看这三项：PG 模式下新业务推荐 `app.rdb()` + RLS（`managePgDatabase action=execute` 跑 `CREATE POLICY`）+ pgstore；已存在的 NoSQL 集合 / 旧 storage / `managePermissions(resourceType=\"noSqlDatabase\")` 在 PG 环境下仍然有效。真正不适用的是 MySQL 与数据模型：当 `RuntimeBackends.mysql === false` 时，`manageMysqlDatabase` / `queryMysqlDatabase` / `relational-database-mcp-cloudbase` skill 都不该使用；`manageDataModel` / `modifyDataModel` 只在传统模式下可用，PG 环境没有对应功能。"
      },
      {
        "name": "envDomainManagement",
        "description": "⚠️ DEPRECATED：此工具已废弃并收编进 manageEnv，请改用 manageEnv(action=\"addSecurityDomain\") / manageEnv(action=\"removeSecurityDomain\")（入参 domains 完全一致）。本别名将在下个版本移除。\n\n管理【环境安全域名】＝浏览器跨域（CORS）白名单：控制允许哪些网页 origin（host:port）从浏览器直接调用本环境的 CloudBase 资源。只做 CORS 来源验证，不提供访问域名，不涉及 HTTPS 证书。⚠️ 与【网关自定义域名】是两套完全独立的配置，互不相干：如需给自己的域名绑定 HTTPS 访问入口（云托管 / 网关服务），那属于 manageGateway 的职责——先 queryGateway(listCustomDomains)；已有域名则 manageGateway(createRoute) 显式传 domain（无需证书）；仅首次绑定新域名才用 bindCustomDomain（需 certificateId）。不要用本工具做这件事。\n\n操作指引：（原工具名 createEnvDomain/deleteEnvDomain，为兼容旧 AI 规则可继续使用这些名称）当浏览器 Web 应用需要从本地 Vite / dev server 直接访问 CloudBase 资源时，先用 queryEnv(action=domains) 检查当前实际浏览器 origin 对应的 host:port 是否已在白名单中，再按该实际值添加。新增或删除后请每约 10 秒轮询 queryEnv(action=domains) 确认状态收敛，勿一次 sleep 满 10 分钟；多数环境数分钟内可收敛。"
      },
      {
        "name": "manageEnv",
        "description": "管理 CloudBase 环境，支持：listPackages=查询可选套餐列表，create=创建新环境（需确认），modifyPlan=变更套餐（升降配，需确认），renew=续费环境（需确认），addSecurityDomain=添加环境安全域名（浏览器 CORS 白名单，不计费、无需确认），removeSecurityDomain=删除环境安全域名（不计费、无需确认）。\n\n⚠️ 涉及费用的操作（create/modifyPlan/renew），执行前必须展示配置摘要并等待用户通过 confirm=\"yes\" 确认；安全域名操作（addSecurityDomain/removeSecurityDomain）不计费，无需 confirm。\n\nℹ️ 安全域名＝浏览器跨域（CORS）白名单，控制允许哪些网页 origin（host:port）从浏览器直接调用本环境的 CloudBase 资源，不提供访问域名、不涉及 HTTPS 证书。给自己的域名绑定 HTTPS 访问入口（云托管/网关服务）属于 manageGateway（listCustomDomains/bindCustomDomain）的职责，与本工具无关。"
      },
      {
        "name": "readNoSqlDatabaseStructure",
        "description": "读取 CloudBase NoSQL 数据库集合与索引结构，支持列出集合、查看集合详情、列出索引以及检查索引是否存在。本工具为服务端管理工具，用于管理端查询数据库结构，不用于编写客户端代码。"
      },
      {
        "name": "writeNoSqlDatabaseStructure",
        "description": "创建、删除和管理 CloudBase NoSQL 数据库集合（collection）。支持创建新集合、删除现有集合，以及通过 updateCollection 的 updateOptions.CreateIndexes / updateOptions.DropIndexes 添加索引和删除索引。当需要新建集合时，使用 action=createCollection。本工具为服务端管理工具，用于管理端操作集合和索引结构，不用于编写客户端代码。"
      },
      {
        "name": "readNoSqlDatabaseContent",
        "description": "查询 CloudBase NoSQL 数据库中的数据记录。支持按条件筛选、分页、排序，适用于管理端数据查询与运维。limit 默认 100、最大 1000；超出请用 offset 分页。projection 仅支持 { field: 1|0 } 对象（示例 {\"_id\":1,\"name\":1,\"createdAt\":1}），不要传字段数组。"
      },
      {
        "name": "writeNoSqlDatabaseContent",
        "description": "修改 CloudBase NoSQL 数据库中的数据记录。支持插入、更新（含 $set/$inc/$push 等操作符）、删除、upsert 等操作，适用于管理端数据写入与运维。⚠️ 服务端写入不含 _openid：若集合依赖客户端 SDK（@cloudbase/js-sdk 或微信小程序 wx.cloud.database()）的行级安全规则（如 doc._openid == auth.openid），服务端写入时需手动补充 _openid 字段，否则客户端将无法读取到该数据。⚠️ 部分更新嵌套字段须使用点号路径，如 `$set: {\"shipping.city\": \"guangzhou\"}`，直接传嵌套对象会覆盖整个字段。"
      },
      {
        "name": "manageDataModel",
        "description": "数据模型查询工具，支持查询和列表数据模型（只读操作）。通过 action 参数区分操作类型：list=获取模型列表（不含Schema，可选 names 参数过滤），get=查询单个模型详情（含Schema字段列表、格式、关联关系等，需要提供 name 参数），docs=生成SDK使用文档（需要提供 name 参数）"
      },
      {
        "name": "modifyDataModel",
        "description": "基于Mermaid classDiagram创建数据模型。为保持兼容性，工具名仍为 modifyDataModel；当前仅支持创建新模型，不支持更新现有模型结构。内置异步任务监控，自动轮询直至完成或超时。"
      },
      {
        "name": "queryPgDatabase",
        "description": "查询 CloudBase PostgreSQL 数据库。支持获取当前 PG 上下文、列出带 schema 的数据库对象、读取轻量元数据、检查单个对象结构，以及执行只读 SQL。"
      },
      {
        "name": "managePgDatabase",
        "description": "管理 CloudBase PostgreSQL：执行已确认的写入 SQL、SQL 风险预检、迁移管理。建表/ALTER/DROP 等 schema 变更必须使用 applyMigration（显式 migrationVersion；成功前自动写入或校验本地 cloudbase/migrations/<version>_<name>.sql，与 CLI tcb db pg migration 一致），不要默认用 execute。execute 主要用于 DML 与 GRANT/RLS 等运维 SQL。"
      },
      {
        "name": "queryPgStorage",
        "description": "查询 CloudBase PostgreSQL 环境下的云存储能力。返回 bucket/config 能力摘要、对象信息查询方案，以及基于 HTTP API 或 SDK 的上传实现方案；不会读取本地文件，也不会默认输出大量签名 URL。"
      },
      {
        "name": "queryMysqlDatabase",
        "description": "查询 CloudBase MySQL 数据库信息。支持执行只读 SQL、查询实例创建任务结果（控制台发起）、查询 MySQL 任务状态、获取当前实例生命周期上下文，以及查询实例慢查询/错误日志（对齐 Manager SDK describeInstanceSlowQueries / describeInstanceErrorLogs）。标准 getInstanceInfo/describeInstance 不返回连接凭据；仅 getConnectionInfo 透传原始连接/集群载荷（含可能的凭据），且仅用于显式 TCP 迁移。业务 CRUD 优先使用 SDK 或 runQuery/runStatement。"
      },
      {
        "name": "manageMysqlDatabase",
        "description": "管理既有 CloudBase MySQL 实例：支持销毁实例、执行写入 SQL/DDL、初始化数据库 Schema。注意：MySQL 开通能力已下线，本工具不再创建实例——需要新开通请前往云开发控制台。环境内没有实例时返回 MYSQL_NOT_CREATED 并给出控制台入口，不再提供开通引导。新环境请优先使用 CloudBase PostgreSQL（managePgDatabase / queryPgDatabase）。"
      },
      {
        "name": "queryFunctions",
        "description": "CloudBase 云函数统一只读入口。通过更自解释的 action 查询 CloudBase 云函数列表、函数详情、执行日志、层、触发器、代码下载地址、已发布版本与流量别名。\n\n**分页说明**：`listFunctions`、`listLayers`、`listVersionByFunction` 支持 `limit` 和 `offset` 参数。\n- `limit`: 分页数量，默认值由后端决定\n- `offset`: 分页偏移，从 0 开始\n- 示例：`queryFunctions(action=\"listFunctions\", offset=10, limit=10)`\n\n**查询 CloudBase 云函数日志**：`action=\"listFunctionLogs\"`，需要提供 `functionName`。日志从 CLS 检索（底层 GetFunctionLogs 接口已下线）。\n- 示例：`queryFunctions(action=\"listFunctionLogs\", functionName=\"my-function\")`\n- 不传 startTime/endTime 时默认查最近 1 天；跨度不能超过 1 天，单次最多返回 100 条\n- 返回 `hasMore=true` 表示还有更早的日志：把返回的 `context` 原样传回取下一页（`offset` 只在前 100 条内生效）\n- `logs[]` 已解析成 requestId / log / statusCode / retCode / durationMs / memoryMb / timestamp\n- 想看某一次调用的完整过程（START、业务日志、REPORT）：`queryFunctions(action=\"getFunctionLogDetail\", requestId=\"xxx\")`\n\n**定时任务 / cron / 定时跑**：使用 `listFunctionTriggers` 查询函数的 timer 触发器配置。\n\n**版本与流量路由**：`listVersionByFunction` 列出已发布版本（对齐 tcb fn list-function-versions）；`getFunctionAlias` 查看别名/灰度配置（对齐 tcb fn get-route，aliasName 默认 `$DEFAULT`）。\n\n**层（Layer）说明**：\n- 层为 SCF 账号级共享命名空间：不同环境创建同名层会共享同一层的版本序列；删除某版本会影响所有绑定该版本的环境的函数\n- 创建层必须用带环境标识的唯一层名，固定格式：`{layerName}_{当前envId}`（如 `common_cloud1-d9ghadgak3edf6b36`）。不要在不同环境使用相同裸层名，创建前先 `listLayers` 查重\n- `listLayers` / `listLayerVersions` / `getLayerVersionDetail` 返回账号级视图，可能含其他环境创建的层\n\n**区分 `queryLogs` 工具**：\n- 本工具用于查询特定 CloudBase 云函数的执行日志\n- `queryLogs` 工具用于搜索 CLS 日志服务（跨服务日志聚合）"
      },
      {
        "name": "manageFunctions",
        "description": "CloudBase 云函数统一写入口。支持创建函数、更新代码、更新配置、调用函数、发布版本、配置流量别名、管理定时跑 / 定时任务 / scheduled job 的 timer 触发器和层绑定。部署包体积有硬上限：请勿把静态内容打进包里——媒体文件（视频、大图、字体）、用户上传的文件、以及频繁更新的静态资源都应放云存储按 URL 引用，否则每次改动都要重新部署函数，包还可能超限。如果要创建 cron 定时任务，先用 createFunction 创建函数，再用 createFunctionTrigger 创建 timer 触发器（支持7段cron表达式），deleteFunctionTrigger 删除触发器。版本发布：`publishVersion` 对齐 tcb fn publish-version / SDK publishVersion；灰度/切流：`updateFunctionAliasConfig` 对齐 tcb fn config-route / SDK updateFunctionAliasConfig（aliasName 默认 `$DEFAULT`）。HTTP 云函数镜像构建部署：createFunction / updateFunctionCode 通过 func.buildStrategy 区分。func.buildStrategy=image（已有镜像，填 func.imageConfig.imageUri）直接创建/更新 HTTP 函数；func.buildStrategy=local（本地 Docker 构建推送）、cloud（CloudApp 云端构建）走镜像构建部署编排（需要 func.imageConfig；build 非必填，缺省仓库坐标自动补齐：namespace 默认 envId、repository 默认函数名），默认仅生成 dry-run 计划；传入 dryRun=false 且 confirm=true 后执行真实部署。真实部署可传 wait=false 立即返回 taskId，再通过 queryFunctions 的 getFunctionDeployStatus 查询进度和结果。wait=false 仅表示当前 Tool 不等待完整部署；调用方不得在 status=running 时结束流程，必须自动轮询到 succeeded/failed 后再向用户汇报，除非达到轮询上限。local 始终要求本地 MCP 模式；cloud 的真实执行需要读取本地构建上下文，也要求本地 MCP 模式；cloud mode 仅支持 cloud dry-run 和 image 策略。func.buildStrategy 省略或为 zip 时按传统代码包部署。危险操作需要显式 confirm=true。\n\n**个人版 TCR 凭证**：imageType=personal 的 local/cloud 构建需要推送凭证。若 MCP 配置的 env 中已设置 TCB_TCR_USERNAME 与 TCB_TCR_PASSWORD（与 TENCENTCLOUD_SECRETID 等密钥同样的配置方式），则不需要在请求参数中传递 func.imageConfig.build.registryCredential，留空即可自动读取。不要向用户索要密码明文，也不要把密码写进工具参数。\n注意这条 env 通道只在**本地 stdio MCP、且客户端的 mcp.json 支持自定义 env 块**时可用：部分 GUI 客户端不继承 shell 的 export，IDE 内置型 MCP 的凭据注入通常是硬编码白名单（例如只放行 TENCENTCLOUD_*），这类用户没有配置自定义 env 的通道，「在 MCP 配置的 env 中设置」对他们是无效指引。面向内置 MCP 用户应改为引导：使用企业版（imageType=enterprise，走实例临时令牌，不需要固定密码），或改用 buildStrategy=image 直接部署已推送的镜像。\n**企业版登录态要求**：enterprise 的 cloud/local 构建要经 CAM 铸造 TCR 临时令牌，环境级 API Key 与 OAuth 换出的临时凭据都不带 CAM 策略，会被前置拦截并提示改用账号级密钥或 image 策略；个人版走静态密码直接 docker login，不经过 CAM，反而是 API Key 用户唯一能走通的构建路径。\n\n**层（Layer）说明**：\n- 层为 SCF 账号级共享命名空间：不同环境创建同名层会共享同一层的版本序列；删除某版本会影响所有绑定该版本的环境的函数\n- 创建层必须用带环境标识的唯一层名，固定格式：`{layerName}_{当前envId}`（如 `common_cloud1-d9ghadgak3edf6b36`）。不要在不同环境使用相同裸层名，创建前先 `listLayers` 查重\n- 相关 action：`createLayerVersion` / `deleteLayerVersion` / `attachLayer` / `detachLayer` / `updateFunctionLayers`（只读查询见 queryFunctions 的 listLayers / listLayerVersions / getLayerVersionDetail）"
      },
      {
        "name": "queryHosting",
        "description": "查询 CloudBase 静态托管的只读信息。适合 AI 先做发现再决定下一步：action=websiteConfig 查询首页/错误页/路由规则与站点域名信息；action=status 查询托管服务状态；action=findFiles 按前缀查找文件；action=listFiles 列出全部托管文件；action=domainStatus 查询自定义域名的当前状态与配置。该工具不会产生任何副作用。"
      },
      {
        "name": "manageHosting",
        "description": "管理 CloudBase 静态托管的变更操作。action=upload 上传本地构建产物到共享域名（域名格式：<envId>-<appId>.tcloudbaseapp.com/<cloudPath>）；action=delete 删除托管文件或目录（必须 confirm=true）；action=setWebsiteDocument 设置首页/错误页/路由规则；action=enableService 开通静态托管；action=bindDomain / unbindDomain / updateDomain 管理自定义域名；action=downloadFile / downloadDirectory 下载托管内容到本地。⚠️ 底层每次托管操作都会请求 DescribeStaticStore 管控接口（20 次/秒 QPS 限制）：批量删除多个文件请逐次调用并保持间隔（建议每秒不超过 10 次），同一目录下多个文件可优先用 isDir=true 一次删除整个目录；若报错含 \"frequency limit\" 说明触发了限流，请等待 1-2 秒后重试，不要连续快速重试。⚠️ 本工具没有关闭默认域名（*.tcloudbaseapp.com）的 action；要禁用该默认公网域名，请用 manageGateway(action=\"disableRoute\", domain=该 STATIC_STORE IsDefault 域名, path=\"/\")（底层 ModifyHTTPServiceRoute，不是 ModifyGatewayRoute）。⚠️ 新项目部署优先使用 manageApps（部署到独立子域名），本工具适合已有老项目继续使用或作为 manageApps 的 fallback。manageApps 与 manageHosting 域名不同，切换会导致老链接失效。若任务只是查看配置、文件或域名状态，请改用 queryHosting。"
      },
      {
        "name": "queryStorage",
        "description": "⚠️ PG 模式环境请使用 queryPgStorage 而非本工具（pgstore 与旧 COS 是两套独立系统）。\n\n查询 CloudBase 云存储信息，支持列出目录文件、获取文件信息、获取临时下载链接等只读操作。返回的文件信息包括文件名、大小、修改时间、下载链接等。注意：action=url 返回的 temporaryUrl 是临时签名链接，有效期由 maxAge 参数决定（默认1小时），不要当作永久公网地址使用。工具还会基于 DescribeEnvs 返回的 Storages[0].CdnDomain 推导 publicUrl，⚠️ 警告：publicUrl 仅在存储桶 ACL 为公有读（所有用户可读）时才能被匿名访问；默认私有读写存储桶返回的 publicUrl 会 403，此时请继续使用 temporaryUrl 或先通过控制台/SDK 将目标路径设置为公有读。\n\n💡 存储桶 ACL 权限管理请使用 permissions 工具：queryPermissions(action=\"getResourcePermission\", resourceType=\"storage\", resourceId=\"bucket-name\") 查询，managePermissions(action=\"updateResourcePermission\", resourceType=\"storage\", resourceId=\"bucket-name\", permission=\"READONLY\") 设置。\n\n📦 CloudBase PG / pgstore 环境：`DescribeEnvs.Storages[]` 列出的 bucket 是旧 NoSQL 后端的，不等于 pgstore bucket。本工具用于查看常规存储；为 PG 浏览器上传准备 bucket 时，请确认目标 bucket 是 pgstore 后端可用的，否则浏览器 `app.storage.from().upload(...)` 会得到 `STORAGE_BUCKET_NOT_FOUND` 并出现 `PUT https://undefined/`。"
      },
      {
        "name": "manageStorage",
        "description": "⚠️ PG 模式环境请使用 queryPgStorage 而非本工具（pgstore 与旧 COS 是两套独立系统）。\n\n管理 CloudBase 云存储文件，仅用于 COS/Storage 对象，不用于静态网站托管。支持上传文件/目录、下载文件/目录、删除文件/目录等操作。删除操作需要设置force=true进行确认，防止误删除重要文件。注意：上传后返回的 temporaryUrl 是临时签名链接，1小时后过期，不要当作永久公网地址写入配置或持久化存储。工具还会基于 DescribeEnvs 返回的 Storages[0].CdnDomain 推导 publicUrl，⚠️ 警告：publicUrl 仅在存储桶 ACL 为公有读（所有用户可读）时才能被匿名访问；默认私有读写存储桶返回的 publicUrl 会 403，此时请继续使用 temporaryUrl 或先通过控制台/SDK 将目标路径设置为公有读。\n\n💡 存储桶 ACL 权限管理请使用 permissions 工具：queryPermissions(action=\"getResourcePermission\", resourceType=\"storage\", resourceId=\"bucket-name\") 查询，managePermissions(action=\"updateResourcePermission\", resourceType=\"storage\", resourceId=\"bucket-name\", permission=\"READONLY\") 设置。\n\n📦 CloudBase PG / pgstore 桶必须先创建后使用（与 Supabase Storage 一致：upload 前 bucket 必须存在）。浏览器 SDK `app.storage.from().upload(path, file)` 不会自动建桶，且 `path` 的第一段就是 bucket 名（例如 `covers/foo.png` → bucket=`covers`）；`from('covers')` 这个参数当前不会被拼到 path 里。如果上传时浏览器看到 `STORAGE_BUCKET_NOT_FOUND` 或 `PUT https://undefined/`（DevTools 表现为 `net::ERR_NAME_NOT_RESOLVED`），先用本工具或控制台确认 / 创建对应的 pgstore bucket，再让前端重试上传，不要让前端把上传失败静默吞掉。`DescribeEnvs.Storages[]` 返回的旧 NoSQL bucket（形如 `<hash>-<envId>-<appId>`）不是可用的 pgstore bucket，切勿当作默认目标使用。"
      },
      {
        "name": "downloadTemplate",
        "description": "自动下载并部署CloudBase项目模板。\n**Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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 版本号信息，便于后续维护和版本追踪\n- 下载 rules 模板时，如果项目中已存在 README.md 文件，系统会自动保护该文件不被覆盖（除非设置 overwrite=true）"
      },
      {
        "name": "searchKnowledgeBase",
        "description": "云开发知识库检索工具，支持 CloudBase 官方文档 (docs)、固定技能文档 (skill) 和 OpenAPI 文档 (openapi) 查询。\n\n      按场景选择 mode：\n      - 工具调用报错且错误信息含具体错误码（如 OperationDenied.FreePackageDenied）时：mode=docs + action=searchDocs（query=错误码），先查错误码官方含义与处理指引再行动，不要凭猜测重试\n      - 不确定答案在哪、需要对官方文档做全文检索时：mode=docs + action=searchDocs（传 query 关键词）\n      - 已知文档标题、层级路径或 URL 时：mode=docs + action=findByName（传 input）或 action=readDoc（传 docPath）\n      - 需要某个场景的落地指南 / 最佳实践时：mode=skill + skillName\n      - 需要 HTTP API 的接口定义时：mode=openapi + apiName\n\n      ⚠️ 重要：当 CloudBase skills 处于禁用状态或当前 IDE 不支持 skill 文件读取时，必须使用 searchKnowledgeBase(mode=skill, skillName=...) 来获取 CloudBase 技能文档内容，而不是尝试直接读取 skill 文件。直接读取可能返回 400 错误。示例：\n      - 需要最小 Web+数据库 Demo 路径时：searchKnowledgeBase(mode=skill, skillName=minimal-web-baas-demo)\n      - 需要 auth-tool-cloudbase 指南时：searchKnowledgeBase(mode=skill, skillName=auth-tool-cloudbase)\n      - 需要 auth-web-cloudbase 指南时：searchKnowledgeBase(mode=skill, skillName=auth-web-cloudbase)\n      - 需要 cloudbase-agent 指南时：searchKnowledgeBase(mode=skill, skillName=cloudbase-agent)\n      - 需要 MCP 接入方式（本地 / 远程）、用 mcporter 在命令行调用工具、或站点 / 插件开关时：searchKnowledgeBase(mode=skill, skillName=cloudbase-mcp)\n\n      返回内容包含该 skill 的 SKILL.md 全文，以及它在远端聚合仓（CNB raw）中的全部 .md 文件地址清单（SKILL.md 与 references/ 等，可直接 HTTP 抓取）。正文中代码栅栏之外的相对链接也会改写为绝对地址；若该 skill 在远端仓中不存在，则只返回内联内容并明确标注，不返回失效链接。\n\n      不确定该选哪个时：mode=skill 下不传 skillName、mode=openapi 下不传 apiName 直接调用，会返回当前可用清单及各自的适用场景 / 接口简介，再带上名称重新调用即可。可选名称也见本工具的 skillName / apiName 枚举（skill 共 28 个，API 共 8 个）。\n\n      注意：OpenAPI 文档 (openapi) 查询只需要传 mode=\"openapi\" 和 apiName，不要传 action；action 仅用于 mode=\"docs\"。"
      },
      {
        "name": "queryCloudRun",
        "description": "查询云托管服务信息，支持获取服务列表、查询服务详情、获取可用模板列表、获取构建日志（getDeployLog，仅云端源码构建/依赖 CODING）、获取运行日志（getProcessLog，镜像与源码部署均可/不依赖 CODING）、获取部署记录以及查询环境云托管开通状态（envStatus）。返回的服务信息包括服务名称、状态、访问类型、配置详情以及最近部署上下文。"
      },
      {
        "name": "manageCloudRun",
        "description": "管理云托管服务，按开发顺序支持：开通云托管环境（initEnv）、初始化项目（可从模板开始，模板列表可通过 queryCloudRun 查询）、下载服务代码、本地运行（仅函数型服务）、部署代码、仅更新配置（updateConfig，无需重新上传代码）、删除服务。deploy 支持两种方式：1) 源码构建（传入 targetPath，本地代码打包上传，默认路径）；2) 已有镜像部署（传入 imageUrl，如 ccr.ccs.tencentyun.com/ns/img:v1，走 DeployType=image 容器型部署，targetPath 可省略）。deploy 语义为「触发部署 + 轻量等待任务注册」（最多约 45s；不需要 buildId 时可传 waitRegistration=false 跳过等待）。源码构建返回 buildId，用 getDeployLog 轮询构建进度后再 getProcessLog；镜像部署（imageUrl）BuildId 常为 0，跳过 getDeployLog，返回 runId/next_step 引导 getProcessLog（或先 getDeployRecords 取 RunId）。若用户明确指定镜像或无需重新构建，必须传 imageUrl，不要仅因本地有源码目录就回退到源码构建。deploy 对已存在服务会先读取远程配置再合并（保留 VpcConf/EnvParams/OpenAccessTypes）。updateConfig 对齐控制台服务设置页。删除操作需要确认，建议设置force=true。新环境首次部署前若提示未开通云托管，先调用 initEnv 开通（异步、幂等）。部署前请确认镜像里没有静态内容：媒体文件（视频、大图、字体）、用户上传的文件、以及频繁更新的静态资源，都应放进云存储按 URL 引用，不要打进镜像——否则每次部署都要全量重推、每个扩容实例都要重拉，一个 demo 视频就能把 30 秒的部署拖成几分钟。"
      },
      {
        "name": "deployBuild",
        "description": "解析 cloudbaserc 并对 hosting[] 中配置了 buildCommand 的项目执行本地构建（仅执行 buildCommand，不安装依赖、不上传）。对应 CLI 的 tcb app build，但只处理 hosting[] 静态托管项，与 cloudbaserc 的 app 资源类型（云端构建管线）无关。声明式 hosting 部署拆分为「build → plan → apply」三步，本工具是第一步：先本地构建产物，再 deployPlan 预演，最后 deployApply 上传产物。deployApply 不再隐式本地构建 —— 带构建命令的 hosting 项在产物缺失时会报错引导先执行本工具。纯静态托管（未配置 buildCommand 且无法探测框架）自动跳过。构建为纯本地操作：不解析环境、不要求登录，也不需要 confirm。\n- cwd：项目根目录，默认当前工作目录\n- mode：环境名，命中 envOverrides.<mode> 时合并对应的多环境覆盖配置"
      },
      {
        "name": "deployPlan",
        "description": "解析 cloudbaserc 并计算声明式部署计划（dry-run，不产生任何变更）。这是 deployApply 的预演对仗工具：plan 计算、deployApply 执行同一份 cloudbaserc。返回每个资源的动作分类：create=新建，update=覆盖更新，skip=无变更/不会执行，conflict=检测到冲突需中断，deploy=直传覆盖。计划已按 yes 复算为「实际会发生的动作」：不传 yes=true 时，云端已存在的函数会标为 skip（并在 declaredStatus 保留 update），与 deployApply 的实际执行结果一致，避免预演与执行相反。\n适用边界：本工具用于项目级声明式编排（一份 cloudbaserc 统一 plan/apply）；单资源临时直传请用 manageFunctions/manageHosting/manageApps。\n- cwd：项目根目录，默认当前工作目录\n- mode：环境名，命中 envOverrides.<mode> 时合并对应的多环境覆盖配置\n- envId：目标环境 ID，优先级高于 cloudbaserc 中的 envId；不传则用配置值或当前绑定环境\n- only：仅计算指定资源类型的计划\n- skip：跳过指定资源类型\n- yes：与 deployApply 的 yes 对齐，用于复算已存在函数的有效动作。true=预演为覆盖更新(update)；false（默认）=预演为保守跳过(skip)"
      },
      {
        "name": "deployApply",
        "description": "解析 cloudbaserc 并按 database→functions→app→hosting→gateway 顺序执行声明式部署。这是 deployPlan 的执行对仗工具（plan 预演 / deployApply 执行同一份 cloudbaserc），属于本地形态的 apply（读本地 cloudbaserc 并在本地构建上传），是会变更云端资源的写操作，必须显式传 confirm=true 才会执行。建议先用 deployPlan 预演，确认计划无误后再执行。\n适用边界：本工具用于项目级声明式编排（一份 cloudbaserc 统一 plan/apply）；单资源临时直传请用 manageFunctions/manageHosting/manageApps。\n- confirm：必须显式传 true 才执行部署，否则直接拒绝\n- confirmDestructive：当本次待执行的数据库迁移含破坏性语句（DROP/TRUNCATE/DELETE、ALTER…DROP/RENAME）时，除 confirm 外还必须显式传 confirmDestructive=true 才会执行；否则拒绝并列出命中的迁移与语句。无破坏性迁移时该参数不生效\n- cwd：项目根目录，默认当前工作目录\n- mode：环境名，命中 envOverrides.<mode> 时合并对应的多环境覆盖配置\n- envId：目标环境 ID，优先级高于 cloudbaserc 中的 envId；不传则用配置值或当前绑定环境\n- only：仅部署指定资源类型\n- skip：跳过指定资源类型\n- yes：遇到已存在资源时的处理方式。true=直接覆盖更新；false（默认）=保守跳过，在无法交互确认的场景下已存在资源不会被覆盖（与 deployPlan 的 yes 语义一致）\n- concurrency：同类型资源最大并行数，默认 1（串行）\n- continueOnError：某个资源失败后继续部署其余资源（database 失败仍强制中断）"
      },
      {
        "name": "queryGateway",
        "description": "CloudBase HTTP 网关统一只读入口（Domain/Route）。查询域名下路径路由及其上游：WEB_SCF/SCF=云函数，CBR=云托管，STATIC_STORE=静态托管，STORAGE=云存储，LH=轻量应用服务器。主键为 Domain + Path；listRoutes / getRoute / listCustomDomains / getPrivilege / cachePurgeTask。getPrivilege 查询 HTTP 网关总开关（enableService）与访问鉴权（enableAuth）状态。cachePurgeTask 查询域名缓存清除任务（先 manageGateway purgeCache 拿 TaskId）。实现自定义域名访问前，先 listCustomDomains：若已有自定义域名，优先 createRoute 挂路由（无需证书 ID）；仅在没有可用自定义域名时才 bindCustomDomain。"
      },
      {
        "name": "manageGateway",
        "description": "CloudBase HTTP 网关统一写入口（Domain/Route）。createRoute/updateRoute/deleteRoute 把域名下的 path 转到上游；enableRoute/disableRoute 启用或禁用已有路由（底层 ModifyHTTPServiceRoute 的 Routes[].Enable，不是 ModifyGatewayRoute）。未传 domain 时用 DomainType=HTTPSERVICE 的 IsDefault 默认 HTTP 域名（形如 *.{region}.app.tcloudbase.com），不会使用静态托管 CDN 域名（*.tcloudbaseapp.com，DomainType=STATIC_STORE）。这是网关默认域上的路径路由，不是 STATIC_STORE 上游绑定；STATIC_STORE 上游必须显式传 upstreamResourceType=STATIC_STORE。关闭静态托管默认域名（*.tcloudbaseapp.com）：先 queryGateway(listRoutes) 找到 DomainType=STATIC_STORE 且 IsDefault=true 的 domain，再 manageGateway(action=\"disableRoute\", domain=该域名, path=\"/\")；勿用 manageHosting。创建后可用 queryGateway(action=\"listRoutes\") 核对 Domain / DomainType / Path / UpstreamResourceType。上游类型只用一个参数 upstreamResourceType（也可写在 route.upstreamResourceType，route 优先）：WEB_SCF=HTTP云函数，SCF=Event云函数，CBR=云托管，STATIC_STORE=静态托管，STORAGE=云存储，LH=轻量应用服务器；配合 targetName 或 route.serviceName（云函数名/云托管服务名/静态托管实例名，常见 staticstore/云存储实例名）。createRoute 只建网关入口，不改上游权限。enablePathTransmission：默认 false 剥触发路径前缀；true 透传完整路径（CBR 多路由、WEB_SCF 自管子路径常需 true；STATIC_STORE 自定义触发路径映射站点根通常 false）。⚠️ 自定义域名访问：若环境已有自定义域名（先 queryGateway listCustomDomains），优先 createRoute 并显式传入该 domain，无需 certificateId；仅首次绑定全新自定义域名时用 bindCustomDomain（certificateId 可选：未传时按域名自动检索证书，单证书自动选用、多证书返回选择指引）。createRoute / bindCustomDomain 创建前会调用 VerifyHTTPServiceRoute 做归属权等预检（探测→创建）；失败时返回 data.checks 与 DNS TXT 指引，配置后重试。CORS/安全域名（浏览器跨域白名单，与本工具的网关自定义域名无关）用 manageEnv(action=addSecurityDomain/removeSecurityDomain)。enableService/authSwitch：HTTP 网关总开关与访问鉴权开关；createRoute 后若访问报 HTTPSERVICE_NONACTIVATED，通常是总开关未开启（用 queryGateway getPrivilege 查询、enableService 开启）。purgeCache：清除域名缓存（CDN/EO，按 URL/前缀/整站），返回 TaskId 后用 queryGateway cachePurgeTask 查进度。路由级还支持 enableSafeDomain（跨域/合法域名校验）、pathRewrite（路径重写）、qpsPolicy（限频）、extension（自定义请求/响应头与缓存规则）；域名级支持 protocol 与 domainExtension。updateRoute 只传要改的字段即可，未传的 CORS/重写/限频/扩展配置会保持原值。"
      },
      {
        "name": "queryAppAuth",
        "description": "CloudBase 应用侧认证配置只读入口。用于查询登录方式、provider、publishable key、API key、client 配置和静态域名等认证准备状态。⚠️ 本工具为管理端配置查询工具，不执行用户登录。当任务要求编写客户端登录代码时（例如「用 JS SDK 登录」），应先通过本工具确认配置状态，再在项目代码中编写 @cloudbase/js-sdk 客户端登录代码（如 auth.signInWithPassword()），而非使用本工具完成登录。若业务要接受普通用户名样式标识符，先查询 action=getLoginConfig；若 usernamePassword=false，下一步应立即调用 manageAppAuth(action=patchLoginStrategy, patch={ usernamePassword: true })，不要直接写 email 登录 API。"
      },
      {
        "name": "manageAppAuth",
        "description": "CloudBase 应用侧认证配置写入口。用于修改登录方式、provider、client 配置，确保 publishable key，以及创建或删除 API key、自定义登录密钥。⚠️ 本工具为管理端配置工具，不执行用户登录。当任务要求编写客户端登录代码时（例如「用 JS SDK 登录」），应先通过本工具完成配置（如启用 usernamePassword、获取 publishable key），再在项目代码中编写 @cloudbase/js-sdk 客户端登录代码（如 auth.signInWithPassword()），而非使用本工具完成登录。若前端要接受普通用户名样式标识符，应先执行 action=patchLoginStrategy 并传入 patch={ usernamePassword: true }，再实现对应前端登录逻辑。⚠️ 短信验证码登录（patch={ phone: true }）使用云开发默认短信通道，开启后即可收发验证码，不需要配置短信签名/模板/自定义 Provider；仅当需要自定义模板/签名或更换短信服务商时才需配置 SmsVerificationConfig 或自定义短信通道。⚠️ action=createApiKey 返回体中的 created 字段表示是否真正新建：created=false 说明复用了环境中已存在的 key，此时 keyName/expireIn 入参不会生效，返回的 keyName/expireAt 均为服务端真实值，并会附带 warnings，切勿把它当作临时凭证分发。"
      },
      {
        "name": "queryApps",
        "description": "查询 CloudBase 应用部署的应用和版本。可查应用列表/详情、版本列表/详情；部署后用 getAppVersion 按 buildId 轮询构建状态；getBuildLog 可查询构建日志用于诊断失败原因。\naction=getUploadUrl（只读）可获取预签名上传 URL：无本地文件系统时（cloud mode），先拿到 uploadUrl 自行 PUT 代码 zip，再用返回的 unixTimestamp 调 manageApps(action=deployApp, cosTimestamp) 触发部署。uploadUrl 是一次性上传凭据，不要外传或写进工单。"
      },
      {
        "name": "manageApps",
        "description": "部署 Web 应用到 CloudBase（构建前后端，部署到独立子域名）。\n云端上传通道（cloud mode，无本地文件系统）：queryApps(action=getUploadUrl) 或 manageApps(action=getUploadUrl) 获取预签名上传 URL → agent 自行 PUT 代码 zip 到 uploadUrl（带 uploadHeaders 与 Content-Type: application/zip）→ 用返回的 unixTimestamp 作为 cosTimestamp 调 deployApp 触发部署。\naction=getUploadUrl 获取预签名上传 URL（cloud mode 下使用），返回上传地址和 cosTimestamp。\naction=deployApp 上传源码 ZIP 并触发远端构建部署管道：\n  1. 远端 npm install（可通过 installCmd=\"\" 跳过）\n  2. 远端 npm run build（可通过 buildCmd=\"\" 跳过）\n  3. 远端 tcb hosting deploy\n\n域名格式：`<serviceName>-<envId>.webapps.tcloudbase.com`（每个 serviceName 一个独立子域名）\n\n✅ 推荐用法（新项目／需要独立域名的 Web 应用，首选此工具）：\n  新建项目首次部署时，传 framework=static, installCmd=\"\", buildCmd=\"\" 跳过远端构建，\n  只执行 tcb hosting deploy。部署后获得独立子域名，支持版本管理。\n\n⚠️ 兼容性说明：\n- 已有项目若之前用 manageHosting 部署过（域名格式：`<envId>-<appId>.tcloudbaseapp.com`），\n  切换到 manageApps 会产生全新的 URL，老链接失效。请保持原部署方式不变。\n- 如需判断：调用 queryHosting 检查是否已有托管文件。\n\n与 manageHosting 对比：\n- manageApps（本工具，新项目首选）：域名 `<serviceName>-<envId>.webapps.tcloudbase.com`，独立子域名，支持版本管理\n- manageHosting（已有项目或 fallback）：域名 `<envId>-<appId>.tcloudbaseapp.com/<path>`，共享环境域名\n两者均可绑定自定义域名。\n\n⚠️ 如果 manageApps 构建失败，先用 queryApps(action=\"getBuildLog\") 查日志；仍不行再 fallback 到 manageHosting。"
      },
      {
        "name": "queryPermissions",
        "description": "查询 CloudBase 权限与用户配置，支持查询资源权限（数据库/云函数/存储桶等）、角色列表/详情、应用用户列表/详情，以及网关 OPA 授权策略（对齐 CLI `tcb policy list/get`）。\n\n示例：\n- 查询存储桶权限：`action=\"getResourcePermission\", resourceType=\"storage\", resourceId=\"bucket-name\"`\n- 列出旧网关策略：`action=\"listPolicy\"`（PG / OPA 引擎环境返回空列表，与 CLI 一致）\n- 读取用户 Rego：`action=\"getPolicy\"`；平台扩展策略：`action=\"getPolicy\", extension=true`\n\n📌 跨后端边界提示：调用前先用 `queryEnv(action=\"info\", envId=...)` 看 `EnvInfo.RuntimeBackends`。`resourceType=\"noSqlDatabase\"` 查询的是 CloudBase NoSQL 集合规则，与 CloudBase PostgreSQL（PG）表的行级安全（RLS）是两套独立机制——同一个 PG 环境里 NoSQL 集合若仍在使用，对那些集合查询本工具结果**仍然有效**。要查 PG 表 RLS，请改用 `queryPgDatabase(action=\"sql\", sql=\"SELECT * FROM pg_policies WHERE tablename=...\")`。本工具不涉及 MySQL 权限。\n\n⚠️ PostgreSQL 环境：平台 `DescribeResourcePermission` 对 PG 环境会直接拒绝。当 `resourceType=\"function\"` 时，本工具会自动回退到 Manager SDK `describeEnvAuthzConfig`（与 CLI `tcb policy get` 一致，读取 `authz.user.rego`）。显式 OPA 策略请用 `listPolicy` / `getPolicy`。\n\n⚠️ 角色类 action（`listRoles` / `getRole`）在 **PostgreSQL 类型环境**下平台侧一律拒绝（`The current API does not support PostgreSQL type environments.`）——这是平台能力边界，不是配置问题，**不要在 PG 环境反复重试**；PG 环境请改用 RLS（`managePgDatabase(action=\"execute\")` 跑 `CREATE POLICY`）或控制台管理权限。"
      },
      {
        "name": "managePermissions",
        "description": "管理 CloudBase 权限与用户配置，支持修改资源权限（数据库/云函数/存储桶等）、角色管理、成员与策略增删、应用用户 CRUD，以及设置网关 OPA Rego 策略（对齐 CLI `tcb policy set`）。\n\n示例：\n- 设置存储桶为私有：`action=\"updateResourcePermission\", resourceType=\"storage\", resourceId=\"bucket-name\", permission=\"PRIVATE\"`\n- 创建角色：`action=\"createRole\", roleName=\"admin\", roleIdentity=\"admin\"`\n- 放开云函数匿名/未登录访问（PG 会走 OPA，对齐 CLI `tcb policy set`）：`action=\"updateResourcePermission\", resourceType=\"function\", resourceId=\"myFn\", permission=\"CUSTOM\", securityRule='{\"invoke\":true}'`\n- 直接设置用户 Rego：`action=\"setPolicy\", regoContent=\"package authz.user\\n\\ndefault allow := false\\n\", confirm=true`（⚠️ 立即禁用旧网关鉴权）\n\n注意：`createUser` / `updateUser` 是环境侧应用用户管理能力，适合测试账号、管理员或预置用户，不应替代浏览器里的 Web SDK 注册表单；前端用户名密码注册应使用 `auth.signUp({ username, password })`，登录应使用 `auth.signInWithPassword({ username, password })`。直接在浏览器里用 `auth.signUp` 创建用户名密码用户取决于 SDK/provider 支持，使用前必须验证；不支持时应走后端或管理端边界，不能在浏览器暴露密钥。`securityRule` 的详细语义取决于 `resourceType`：`doc._openid`、`auth.openid`、查询条件子集校验，以及 `create` / `update` / `delete` JSON 模板仅适用于 `resourceType=\"noSqlDatabase\"` 的文档数据库安全规则；配置 `function` 或 `storage` 时，请参考各自官方安全规则文档，而不是复用 NoSQL 模板。\n\n📌 跨后端边界提示：调用前先用 `queryEnv(action=\"info\", envId=...)` 看 `EnvInfo.RuntimeBackends`：\n- `resourceType=\"noSqlDatabase\"` 仅作用于 CloudBase NoSQL 文档数据库的集合；CloudBase PostgreSQL（PG）表的行级权限**不**受它控制——PG 表请改用 RLS：`managePgDatabase(action=\"execute\", confirm=true)` 跑 `ALTER TABLE ... ENABLE ROW LEVEL SECURITY` 与 `CREATE POLICY ...`。同一个 PG 环境里如果还有 NoSQL 集合在用，对那些**集合**继续使用 `noSqlDatabase` 规则是正确的——不是\"PG 环境就禁用本工具\"。\n- `resourceType=\"storage\"` 控制的是 NoSQL/COS 存储桶 ACL；PG 的 `pgstore` bucket 不在此 `resourceType` 覆盖范围内。\n- 本工具不涉及 MySQL；MySQL 数据库权限请走 MySQL 自身的 GRANT/REVOKE 语句（通过 `manageMysqlDatabase`）。\n\n⚠️ PostgreSQL 环境：平台 `ModifyResourcePermission` 对 PG 环境会直接拒绝。当 `resourceType=\"function\"` 时，本工具会自动回退到 Manager SDK `modifyEnvAuthzConfig`（与 CLI `tcb policy set` 一致，写入 `authz.user.rego`）。`securityRule` 可传完整 Rego（`package authz.user`）或 `'{\"invoke\":true}'`（自动生成放通 anonymous/unauthenticated 调 functions 的策略）。设置 Rego 后旧网关鉴权会失效，行为与 CLI 相同。显式 OPA 策略请优先用 `action=\"setPolicy\"`。\n\n⚠️ 角色类 action（`createRole` / `deleteRoles` / `updateRole`）在 **PostgreSQL 类型环境**下平台侧一律拒绝（`The current API does not support PostgreSQL type environments.`）——平台能力边界，不是配置问题，**不要在 PG 环境反复重试**；PG 环境请改用 RLS（`managePgDatabase(action=\"execute\")` 跑 `CREATE POLICY`）或控制台管理权限。"
      },
      {
        "name": "queryLogs",
        "description": "CloudBase 日志域统一只读入口。支持检查日志服务状态并搜索 CLS 日志。\n\n**重要区分**：\n- 查询云函数日志：使用 `queryFunctions(action=\"listFunctionLogs\", functionName=\"xxx\")`\n- 查询 CLS 日志（跨服务日志聚合）：使用本工具 `queryLogs(action=\"searchLogs\")`\n- 开通 CLS 日志服务：使用 `manageLogs(action=\"createLogService\", confirm=true)`\n\n**适用场景**：\n- 检查 CLS 日志服务是否开通：`action=\"checkLogService\"`\n- 跨服务日志搜索（如搜索所有 ERROR 日志）：`action=\"searchLogs\"`\n- 按 CLS 语法检索特定服务的日志：`action=\"searchLogs\", service=\"tcb|tcbr\"`"
      },
      {
        "name": "manageLogs",
        "description": "CloudBase 日志域写入入口。用于开通 CLS 日志服务（对齐 Manager SDK `log.createLogService` / CreateEnvResource Resources=['log']）。\n\n**适用场景**：\n- 开通 CLS 日志服务：`action=\"createLogService\", confirm=true`\n\n开通为异步操作：接口成功不代表立即可用，请随后用 `queryLogs(action=\"checkLogService\")` 轮询确认。"
      },
      {
        "name": "queryAgents",
        "description": "CloudBase Agent 域统一只读入口。支持列表、详情与日志查询。"
      },
      {
        "name": "manageAgents",
        "description": "CloudBase Agent 域统一写入口。支持创建、更新和删除远端 Agent。"
      },
      {
        "name": "callCloudApi",
        "description": "通用的云 API 调用工具，主要用于 CloudBase / 腾讯云管控面与依赖资源相关 API 调用。**调用前必读接口索引** https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/api-reference.md （每日自动同步的 Action 级索引，含 rate limit；先查此索引确认 service/Action/参数，避免猜测 Action 名称；索引未覆盖的产品再去该产品官方 API 文档核对）。如果你的目标是通过 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 service，常用 Action 分类如下：\n\n**环境管理**: `CreateEnv`、`ModifyEnv`、`DescribeEnvs`、`DestroyEnv`\n**用户管理**: `CreateUser`、`ModifyUser`、`DescribeUserList`、`DeleteUsers`\n**认证配置**: `EditAuthConfig`、`DescribeAuthDomains`\n**云函数**: `DescribeFunctions`、`CreateFunction`、`UpdateFunctionCode`、`DeleteFunction`\n**数据库**: `CreateMySQLInstance`、`DescribeMySQLInstances`、`DestroyMySQLInstance`\n\n⚠️ 云托管（CloudBase Run）统一走 tcbr service（CreateCloudRunEnv / CreateCloudRunServer / DescribeEnvBaseInfo / DescribeCloudRunEnvs，version=\"2022-02-17\"），tcb 旧小租户接口 CreateCloudBaseRunResource 等已被禁用；部署请用 manageCloudRun。查询单个环境基础信息/是否已开通云托管用 DescribeEnvBaseInfo（EnvId 必填），查询环境列表及资源信息用 DescribeCloudRunEnvs（EnvId 可选过滤）。\n\n⚠️ Region 必须作为本工具顶层参数 `region` 传入（对应 X-TC-Region / 地域 endpoint），不要放进 params。params 里的 Region 会被剥离并当作顶层 region 使用。\n\n销毁环境时，常见做法是至少带上 `EnvId` 和 `BypassCheck: true`，如果环境已经处于隔离期再按文档补 `IsForce: true`。"
      },
      {
        "name": "prepareFeedback",
        "description": "返回公开仓库的新建 issue 页面。\n\n**什么时候用**：\n- `channel=\"case\"`：作品已经做出来，用户想展示到案例墙。\n- `channel=\"retrospective\"`：这次开发不顺利，用户想把卡点反馈给平台。\n\n**怎么用**：\n- 只调用一次。返回的是页面地址，不是已提交的 issue。\n- 在对话里写好正文，把链接交给用户。用户登录后自己提交。\n- 不要代为提交，不要把环境 ID 或密钥写进正文。"
      }
    ],
    "9ed58e279302f969f98b888e0f155853": [
      {
        "name": "miora_write_canvas",
        "description": "Create or update a `.miora` canvas — a visual board that arranges images and videos, previewable inside WorkBuddy. Use it when the user wants a moodboard, a visual summary, a storyboard, or any \"put these materials on a canvas\" request.\n\nDescribe WHAT goes on the canvas; node ids, parent links and layout coordinates are generated for you. Items are laid out on a fixed-column grid (4 per row by default) and every image/video node keeps the real pixel size of its asset.\n\nText is NOT supported on the canvas: never pass type=\"text\" entries. Titles, section names and captions belong in your chat reply, not on the canvas. Invalid entries (text entries, missing files, …) are SKIPPED — the remaining valid entries are still written, and the result lists what was skipped and why.\n\n- action=\"create\": write a new canvas (overwrites the file if it already exists). Omit `items` (or pass an empty array) to create a blank canvas with a single default page — use this when the user just wants \"a new canvas\" to fill in themselves.\n- action=\"update\": read the existing canvas, then add / replace items by `id` and remove those listed in `remove_item_ids`. Items you do not mention are kept as-is.\n\nImages and videos are referenced by `source_path` (absolute local path). They are COPIED next to the canvas file into a `<name>_assets/` folder, so the canvas stays self-contained and portable.\n\nIMPORTANT: this tool only writes the file — it does NOT make the canvas visible anywhere. After it succeeds you MUST do BOTH of the following with the returned `file_path`:\n  1. `present_files` — include the `.miora` `file_path` in `files` (FIRST), then every path from the returned `copied_assets` so the images/videos also get their own artifact cards. Skipping this leaves the user with NOTHING in the artifact panel. Always deliver `copied_assets`, never the original `resultFiles[].localPath` from the generation tools: those live in a hidden plugin directory and never become artifacts.\n  2. `miora_open_canvas` — open the canvas in the side panel for immediate viewing. This only opens a panel; it does NOT register any artifact card."
      },
      {
        "name": "miora_open_canvas",
        "description": "Open a `.miora` canvas file — call this after `miora_write_canvas` so the user can see the canvas immediately. The canvas is registered as an artifact card and opened automatically; it renders as an interactive read-only board.\nYou do NOT need to also call `present_files` for this canvas — doing so would just register the same file twice."
      },
      {
        "name": "miora_text_to_image",
        "description": "Generate an image from a natural-language prompt using the Miora multimodal service. ONLY use this tool when the active skill/scenario is \"多模态内容生成\" (Multimodal Generation). Do NOT call for general conversation or unrelated skills — it will not work outside that scenario. PREFLIGHT: You MUST first call `connect_cloud_service` in this turn (or reuse the `clientTempToken` from an earlier call in the same session if still valid) and pass its `clientTempToken` as the `tempKey` argument here. Do NOT invent or hard-code a tempKey. If you receive `AUTH_INVALID_TEMP_KEY` / `AUTH_MISSING_TEMP_KEY`, re-call `connect_cloud_service` to obtain a fresh `clientTempToken` and retry. On success, pass `resultFiles[].localPath` (absolute local path) to `miora_write_canvas` as `items[].source_path`. That tool copies the file into the session directory and returns `copied_assets` — hand THOSE paths to `present_files` to get artifact cards for the images/videos. Do NOT hand `localPath` straight to `present_files`: it lives in a hidden plugin directory and never becomes an artifact. Do NOT hand `signedUrl` to `present_files` either — a remote URL opens an in-app browser panel instead of an artifact card, and it expires. Only fall back to `signedUrl` when `localPath` is absent (local download failed). Do NOT expose or mention tokens, credentials, or authentication details to the user."
      },
      {
        "name": "miora_edit_image",
        "description": "Edit / re-imagine an existing image based on a natural-language instruction, using the Miora multimodal service. ONLY use this tool when the active skill/scenario is \"多模态内容生成\" (Multimodal Generation). Do NOT call for general conversation or unrelated skills — it will not work outside that scenario. PREFLIGHT: You MUST first call `connect_cloud_service` in this turn (or reuse the `clientTempToken` from an earlier call in the same session if still valid) and pass its `clientTempToken` as the `tempKey` argument here. Do NOT invent or hard-code a tempKey. If you receive `AUTH_INVALID_TEMP_KEY` / `AUTH_MISSING_TEMP_KEY`, re-call `connect_cloud_service` to obtain a fresh `clientTempToken` and retry. Provide at least one reference image via `images[]` (any of: absolute local path, miora fileKey, public https URL, data URI). PREFER fileKey when chaining from another miora tool — it avoids a base64 round-trip. On success, pass `resultFiles[].localPath` (absolute local path) to `miora_write_canvas` as `items[].source_path`. That tool copies the file into the session directory and returns `copied_assets` — hand THOSE paths to `present_files` to get artifact cards for the images/videos. Do NOT hand `localPath` straight to `present_files`: it lives in a hidden plugin directory and never becomes an artifact. Do NOT hand `signedUrl` to `present_files` either — a remote URL opens an in-app browser panel instead of an artifact card, and it expires. Only fall back to `signedUrl` when `localPath` is absent (local download failed). Do NOT expose tokens or credentials to the user."
      },
      {
        "name": "miora_text_to_video",
        "description": "Generate a video from a natural-language prompt using the Miora multimodal service. ONLY use this tool when the active skill/scenario is \"多模态内容生成\" (Multimodal Generation). Do NOT call for general conversation or unrelated skills — it will not work outside that scenario. PREFLIGHT: You MUST first call `connect_cloud_service` in this turn (or reuse the `clientTempToken` from an earlier call in the same session if still valid) and pass its `clientTempToken` as the `tempKey` argument here. Do NOT invent or hard-code a tempKey. If you receive `AUTH_INVALID_TEMP_KEY` / `AUTH_MISSING_TEMP_KEY`, re-call `connect_cloud_service` to obtain a fresh `clientTempToken` and retry. Video generation may take up to ~15 minutes; the tool blocks until the task completes or times out. On success, pass `resultFiles[].localPath` (absolute local path) to `miora_write_canvas` as `items[].source_path`. That tool copies the file into the session directory and returns `copied_assets` — hand THOSE paths to `present_files` to get artifact cards for the images/videos. Do NOT hand `localPath` straight to `present_files`: it lives in a hidden plugin directory and never becomes an artifact. Do NOT hand `signedUrl` to `present_files` either — a remote URL opens an in-app browser panel instead of an artifact card, and it expires. Only fall back to `signedUrl` when `localPath` is absent (local download failed). Do NOT expose tokens or credentials to the user."
      },
      {
        "name": "miora_frame_to_video",
        "description": "Generate a video from a starting frame (and optionally an ending frame) using the Miora multimodal service. ONLY use this tool when the active skill/scenario is \"多模态内容生成\" (Multimodal Generation). Do NOT call for general conversation or unrelated skills — it will not work outside that scenario. PREFLIGHT: You MUST first call `connect_cloud_service` in this turn (or reuse the `clientTempToken` from an earlier call in the same session if still valid) and pass its `clientTempToken` as the `tempKey` argument here. Do NOT invent or hard-code a tempKey. If you receive `AUTH_INVALID_TEMP_KEY` / `AUTH_MISSING_TEMP_KEY`, re-call `connect_cloud_service` to obtain a fresh `clientTempToken` and retry. Provide `first_frame` (required; optionally `last_frame`). Each may be an absolute local path, a miora fileKey (`bga/...` or `file/...`), a public https URL, or a `data:image/...;base64,...` URI. PREFER fileKey when chaining from another miora tool (e.g. `miora_text_to_image` returned `resultFiles[].fileKey`) — it avoids a base64 round-trip and is significantly faster / cheaper. On success, pass `resultFiles[].localPath` (absolute local path) to `miora_write_canvas` as `items[].source_path`. That tool copies the file into the session directory and returns `copied_assets` — hand THOSE paths to `present_files` to get artifact cards for the images/videos. Do NOT hand `localPath` straight to `present_files`: it lives in a hidden plugin directory and never becomes an artifact. Do NOT hand `signedUrl` to `present_files` either — a remote URL opens an in-app browser panel instead of an artifact card, and it expires. Only fall back to `signedUrl` when `localPath` is absent (local download failed). Do NOT expose tokens or credentials to the user."
      },
      {
        "name": "miora_reference_to_video",
        "description": "Generate a video guided by one or more reference images (character / style / composition) using the Miora multimodal service. ONLY use this tool when the active skill/scenario is \"多模态内容生成\" (Multimodal Generation). Do NOT call for general conversation or unrelated skills — it will not work outside that scenario. PREFLIGHT: You MUST first call `connect_cloud_service` in this turn (or reuse the `clientTempToken` from an earlier call in the same session if still valid) and pass its `clientTempToken` as the `tempKey` argument here. Do NOT invent or hard-code a tempKey. If you receive `AUTH_INVALID_TEMP_KEY` / `AUTH_MISSING_TEMP_KEY`, re-call `connect_cloud_service` to obtain a fresh `clientTempToken` and retry. Provide `references` (required). Each item may be an absolute local path, a miora fileKey (`bga/...` or `file/...`), a public https URL, or a `data:image/...;base64,...` URI. PREFER fileKey when chaining from another miora tool. On success, pass `resultFiles[].localPath` (absolute local path) to `miora_write_canvas` as `items[].source_path`. That tool copies the file into the session directory and returns `copied_assets` — hand THOSE paths to `present_files` to get artifact cards for the images/videos. Do NOT hand `localPath` straight to `present_files`: it lives in a hidden plugin directory and never becomes an artifact. Do NOT hand `signedUrl` to `present_files` either — a remote URL opens an in-app browser panel instead of an artifact card, and it expires. Only fall back to `signedUrl` when `localPath` is absent (local download failed). Do NOT expose tokens or credentials to the user."
      },
      {
        "name": "miora_query_task",
        "description": "Query the CURRENT status of a Miora image/video generation task by its `upstream_task_id`. Use this when a Miora generation tool (miora_text_to_image / miora_edit_image / miora_text_to_video / miora_frame_to_video / miora_reference_to_video) has returned an `upstreamTaskId` in an error/timeout payload — the backend task is likely still running or already finished, so resubmitting would charge the user a second time and orphan the paid task. This tool returns IMMEDIATELY with the backend status (does NOT wait for completion, does NOT download artifacts). If the status is `pending`/`processing`, tell the user it is still generating and check again on a later turn — do NOT poll this tool in a loop. IMPORTANT: pass `task_type=\"video\"` when the id came from a video tool (miora_text_to_video / miora_frame_to_video / miora_reference_to_video, i.e. `provider=\"copilot-video\"`). Default `task_type=\"image\"` matches image tools. Passing the wrong type may make the backend cache a spurious failure for 5 minutes. PREFLIGHT: You MUST first call `connect_cloud_service` in this turn (or reuse the `clientTempToken` from an earlier call in the same session if still valid) and pass its `clientTempToken` as the `tempKey` argument here. Do NOT invent or hard-code a tempKey. If you receive `AUTH_INVALID_TEMP_KEY` / `AUTH_MISSING_TEMP_KEY`, re-call `connect_cloud_service` to obtain a fresh `clientTempToken` and retry."
      }
    ]
  }
}