所有工具

recipe_save

技能与流程 · macOS · Windows

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

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

macOS

用途

将可复用的 SKILL——一个有名称的配方(带参数的 LMCP 工具调用有序序列)——保存到此 Mac,使用户可随时使用 recipe_run 再次运行。用户可保存技能,将反复执行的多步骤 LMCP 工作流(晨间简报、收件箱分类、周报、数据提取)变成一条可复用命令。已保存的技能可通过 recipe_export 与他人共享。清单必须包含名称和非空 steps 数组。返回 {name}。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构未声明明确的确认参数。这并不代表可以未经许可操作;请检查效果并取得授权。

英文规范技术架构macOS
{
  "properties": {
    "manifest": {
      "description": "The recipe manifest. Shape: {\"name\": string (required), \"description\": string, \"params\": [{\"name\": string, \"type\": \"string\"|\"int\"|\"bool\", \"default\": any}], \"steps\": [ ... ] (required, non-empty), \"outputs\": [{\"kind\": string}]}. A step is EITHER a tool call {\"tool\": <tool_name>, \"args\": {...}} OR a pause {\"wait\": {\"seconds\": N}} (also {\"wait\": N}). Any arg string may interpolate a declared param with ${name} (e.g. \"limit\": \"${count}\"); an arg that is exactly \"${name}\" keeps the param's type. Steps run in order; a later step can consume an EARLIER step's output with \"${steps[N].result.KEY}\" (0-based; supports .key and [i], e.g. \"account\": \"${steps[0].result.accounts[0].name}\"). On recipe_run a state-changing step previews first unless confirm:true.",
      "type": "object"
    }
  },
  "required": [
    "manifest"
  ],
  "type": "object"
}

文档示例

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

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

Windows

用途

将可复用的 SKILL——一个有名称的配方(带参数的 LMCP 工具调用有序序列)——保存到此计算机,使用户可随时使用 recipe_run 再次运行。用户可保存技能,将反复执行的多步骤 LMCP 工作流(晨间简报、收件箱分类、周报、数据提取)变成一条可复用命令。清单必须包含名称和非空 steps 数组。arg 字符串可使用 ${name} 插入已声明的 param;恰好为 "${name}" 的 arg 会保留 param 的类型。后续步骤可使用 "${steps[N].result.KEY}" 读取先前步骤的输出(从 0 开始,即 0-based;支持 .key 和 [i])。返回 {name, step_count}。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构未声明明确的确认参数。这并不代表可以未经许可操作;请检查效果并取得授权。

英文规范技术架构Windows
{
  "properties": {
    "manifest": {
      "description": "The recipe manifest. Shape: {\"name\": string (required), \"description\": string, \"schema_version\": int, \"params\": [{\"name\": string, \"type\": string, \"default\": any}], \"steps\": [{\"tool\": string, \"args\": object}] (required, non-empty)}.",
      "type": "object"
    }
  },
  "required": [
    "manifest"
  ],
  "type": "object"
}

文档示例

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

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