参考MCP 工具save_cloud_skill

Tool Reference

save_cloud_skill

保存或更新可复用的 Cloud Skill,并创建它的下一个版本化 revision。

只发布经过审查的 procedure

提供持久 instructions 和可选的 typed components。不要将 credentials 或 private material 放入 skill body;该工具会把 procedure 保存在经过认证的 personal 或 team scope 中。

公开 MCP 工具

save_cloud_skill

用途

创建或更新可复用的 Cloud Skill,并为其 instructions 和 typed components 生成下一个不可变 revision。

适用场景

  • 发布持久的 procedure、rule 或 SOP,使已连接的 agent 能通过现有 Cloud Skill contract 检索并执行。
  • 创建新的 personal skill,或为 team scope 提交等待团队 review flow 的 revision。
  • 当 procedure 需要新版本和新的 canonical hash 时替换现有 slug。

不适用场景

  • 不要将临时 chat、credentials、bearer tokens、private keys 或 raw secrets 作为 skill instructions 或 component content 存储。
  • 不要用于普通的持久 fact;请使用 remember 或 SDK capture workflow。
  • 不要假设 team publish intent 会立即生效:team revision 会保存为 proposed,而不是直接 published。
  • 不要超过 instruction、component 或 component-count limits;验证会拒绝过大或不安全的 logical path。

所需权限范围

  • MCP surface 需要 memory:write。
  • 该工具位于 advanced surface,最低 tier 为 pro;经过认证的 personal 或 team scope 决定 skill 的存储位置。

参数列表

参数名类型描述
namestring · 必填人类可读的 skill name;空 name 会被拒绝。
instructionsstring · 必填Root procedure body;必填,UTF-8 编码后限制为 64 KiB。
slugstring · 默认值: derived from name可选的小写 skill identifier,必须符合 1–64 字符的 slug contract。
descriptionstring · 默认值: empty可选的 discovery text,由 Level 0 query discovery 返回。
publishboolean · 默认值: truePublish intent;personal scope 可直接 publish,而 team scope 会创建 proposed revision。
components_jsonJSON array string · 默认值: []可选的 component objects,包含 type、logical_path、content 或 artifact_ref、mime_type 和 metadata;最多 50 个,每个 content body 限制为 128 KiB。

返回模式

JSON CloudSkillResponseEnvelope,包含 object='cloud_skill'、schema_version='xmemo.cloud_skill.v1'、kind='root'、render_status、warnings,以及包含 skill_id、slug、name、description、revision_id、revision_number、instructions、canonical_hash 和 typed resources manifest 的 data。

使用示例

发布 personal procedure
save_cloud_skill({
  name: "deployment-procedure",
  instructions: "Check the release, run the smoke test, and report the result.",
  slug: "deployment-procedure",
  description: "A bounded deployment verification procedure",
  publish: true
})

错误信息

  • Authorization failure:MCP token 缺少 memory:write,或调用者无法写入 resolved personal/team scope。
  • Validation failure:name 或 instructions 为空,slug 无效,或 instruction body 超过 64 KiB。
  • Component validation failure:components_json 不是 JSON array,component path 为空/绝对路径/类似 traversal/保留名/重复,type 无效,或 component 超过 128 KiB。
  • Scope lifecycle:personal publish 是直接的;team publish 会保存为 proposed,并需要 team review flow。
  • recall_cloud_skill — 保存后发现 skill、加载 root manifest,或读取 pinned resource。
  • execute_cloud_skill — 只有在 recall 目标 revision 后,才运行声明的 script component。
  • remember — 不需要可复用 procedure 时,使用普通的持久 memory。

来源: Cloud Skills