본문으로 건너뛰기
모든 도구

recipe_save

스킬 및 레시피 · macOS · Windows

효과: 쓰기. 상태: 조건부 제공.

‘조건부 제공’은 도구가 버전, 플랫폼, 권한, 계정 또는 설정에 따라 달라질 수 있음을 뜻하며 모든 설치에서 활성화되었다는 의미는 아닙니다.

macOS

목적

재사용 가능한 SKILL, 즉 이름이 있는 레시피(매개변수가 있는 LMCP 도구 호출의 순서 있는 시퀀스)를 이 Mac에 저장하여 사용자가 언제든 recipe_run으로 다시 실행할 수 있게 합니다. 사용자는 반복하는 여러 단계의 LMCP 워크플로(아침 브리핑, 받은 편지함 분류, 주간 보고서, 데이터 가져오기)를 하나의 재사용 가능한 명령으로 만들기 위해 저장합니다. 저장된 스킬은 recipe_export로 다른 사람과 공유할 수 있습니다. 매니페스트에는 name과 비어 있지 않은 steps 배열이 있어야 합니다. 단계는 스스로 확인할 수 없습니다. 단계 args의 `confirm`은 저장할 때 제거되고(confirm_removed_steps가 confirm이 있던 단계 수를 알려 줌) 실행할 때 무시되므로, 확인을 요구하는 도구의 단계는 실행되지 않고 미리보기로 응답합니다. 이미 레시피인 이름은 recipe_exists로 거부되며 아무것도 쓰지 않습니다. 교체하려면 overwrite: true를 전달하세요. {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}). 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 asks for one confirmation when the recipe has state-changing steps; a step whose tool asks for its own confirmation then 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.",
      "type": "object"
    },
    "overwrite": {
      "description": "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.",
      "type": "boolean"
    }
  },
  "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 워크플로(아침 브리핑, 받은 편지함 분류, 주간 보고서, 데이터 가져오기)를 하나의 재사용 가능한 명령으로 만들기 위해 저장합니다. 매니페스트에는 name과 비어 있지 않은 steps 배열이 있어야 합니다. 단계에는 "optional": true(불리언, 기본값 false)를 추가할 수 있습니다. 실패하면 recipe_run이 해당 단계에 {ok:false, error}를 기록하고 skipped_optional에 나열한 뒤 중단하지 않고 다음 단계로 계속합니다. 사용자가 가지고 있지 않을 수 있는 소스(앱, 권한)에 사용하세요. 인수 문자열은 선언된 매개변수를 ${name}으로 보간할 수 있으며, 정확히 "${name}"인 인수는 매개변수의 유형을 유지합니다. 이후 단계는 "${steps[N].result.KEY}"(0부터 시작, .key와 [i] 지원)로 이전 단계의 출력을 사용할 수 있습니다. 단계는 스스로 확인할 수 없습니다. 단계 args의 confirm은 제거되므로 확인을 요구하는 도구(보내기, 삭제, 파일 교체, 명령 실행)의 단계는 미리보기를 반환합니다. 이미 레시피인 이름은 recipe_exists로 거부되며 아무것도 쓰지 않습니다. 교체하려면 overwrite: true를 전달하세요. {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, \"optional\": bool}] (required, non-empty)}.",
      "type": "object"
    },
    "overwrite": {
      "description": "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.",
      "type": "boolean"
    }
  },
  "required": [
    "manifest"
  ],
  "type": "object"
}

문서 예시

recipe_save 문서 예시입니다. 이 예시를 실행하지 마세요. 표시된 인수는 가상 데이터 세트에 속합니다. 실제 호출 전에 실제 식별자를 확인하고 승인을 받으세요.

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