跳到正文
所有工具

recipe_import

技能与流程 · macOS · Windows

效果: 写入. 状态: 受限可用.

“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。

macOS

用途

安装他人与你共享的 SKILL——传入对方 recipe_export 返回的 skill_token(或原始配方清单 JSON)。将其保存到这台 Mac,以便 recipe_run 使用。导入只会存储该技能。运行时,若其中含有会更改状态的步骤(发送/写入/删除),会要求一次确认,且步骤无法自行确认:步骤参数中的 `confirm` 在此处会被移除(confirm_removed_steps),运行时也会被忽略,因此其工具要求确认的步骤只会返回预览而不会执行。如果已存在同名技能,导入内容会以不冲突的名称保存。首次调用返回预览;confirm: true 才会保存。返回 {name, imported}。

必填输入

此平台的架构未声明必填输入,但仍可能存在可选选择器或运行时要求。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — macOS
{
  "properties": {
    "confirm": {
      "description": "Must be true to save the skill. Without it the call returns a preview and saves nothing.",
      "type": "boolean"
    },
    "skill": {
      "description": "A skill_token from recipe_export, or a raw recipe manifest JSON string.",
      "type": "string"
    },
    "skill_token": {
      "description": "Alias for `skill` — the exact field name recipe_export returns.",
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

文档示例

recipe_import 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "skill": "{\"name\":\"Demo morning brief\",\"description\":\"Read the local date and time.\",\"steps\":[{\"tool\":\"get_datetime\",\"args\":{}}]}"
}

Windows

用途

安装他人与你共享的 SKILL——传入对方 recipe_export 返回的 skill_token(或原始配方清单 JSON)。将其保存到这台设备,以便 recipe_run 使用。安全:导入只会存储该技能;步骤无法自行确认,因此之后运行时,其工具要求确认的步骤(发送、删除、替换文件、运行命令)只会返回预览,不会改动任何内容。如果已存在同名技能,导入内容会以不冲突的名称保存。首次调用返回预览,列出该技能的步骤,不保存任何内容;confirm=true 才会保存。返回 {name, imported}。

必填输入

此平台的架构未声明必填输入,但仍可能存在可选选择器或运行时要求。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — Windows
{
  "properties": {
    "confirm": {
      "description": "Must be true to save the skill. Without it, returns a preview naming its steps.",
      "type": "boolean"
    },
    "skill": {
      "description": "A skill_token from recipe_export, or a raw recipe manifest JSON string.",
      "type": "string"
    },
    "skill_token": {
      "description": "Alias for `skill` — the exact field name recipe_export returns.",
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

文档示例

recipe_import 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "skill": "{\"name\":\"Demo morning brief\",\"description\":\"Read the local date and time.\",\"steps\":[{\"tool\":\"get_datetime\",\"args\":{}}]}"
}