Recipe Save
recipe_saveSaves a reusable SKILL — a named recipe (an ordered sequence of LMCP tool calls with parameters) — to this Mac so the user can re-run it anytime with recipe_run. A user would save one to turn a multi-step LMCP workflow they repeat (a morning brief, inbox triage, a weekly report, a data pull) into a single reusable command. Saved skills can be shared with other people via recipe_export. The manifest must have a name and a non-empty steps array. A step cannot confirm itself: confirm in a step's args is removed when saving (confirm_removed_steps says how many steps had one) and ignored when running, so a step whose tool asks for confirmation answers with its preview instead of executing. A name that is already a recipe is refused with recipe_exists and nothing is written; pass overwrite: true to replace it. Returns {name}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| manifest | Yes | 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}). A tool-call step may add "optional": true (a boolean; default false): if it fails, recipe_run records {ok:false, error} for it, lists it in skipped_optional and carries on with the next step, instead of stopping — use it for a source the user may not have (an app, a permission). 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}"). A step cannot confirm itself: do not put `confirm` in a step's args (it is removed when saving and ignored when running). recipe_run runs the steps as they are; a step whose tool asks first (a send, a permanent delete, a publication) answers with its preview and is not executed. A step that names a note should give note_name (the note's title): a note_id only names the note on the Mac that issued it, so a step that gives both is saved with note_name alone. | |
| overwrite | No | Must be true to replace a recipe that already has this name. Without it, a taken name is refused with recipe_exists and the existing recipe is left as it was. |