script path와 revision으로 실행하기
active skill을 선택하고 재현성이 중요하면 revision을 pin하며 type이 script인 component를 지정합니다. 실행에는 memory:write가 필요하고 typed execution envelope을 반환합니다.
공개 MCP 도구
execute_cloud_skill
목적
active Cloud Skill에서 선언된 script component 하나를 격리된 SandboxExecutionEngine을 통해 실행합니다.
사용 시점
- 의도한 revision을 선택한 뒤 skill에서 재현 가능한 Python 또는 Bash script component를 실행합니다.
- bounded JSON input object를 전달하고 status와 output data를 포함한 typed execution result를 처리합니다.
- agent prompt에 code를 복사하지 않고 skill의 재사용 가능한 procedure를 executable component로 사용합니다.
사용하지 않을 시점
- reference, example, template, document 또는 artifact component를 실행하지 않습니다. type='script'만 허용됩니다.
- production에서 안전하지 않은 local fallback에 의존하지 않습니다. working bubblewrap isolation driver가 없으면 기본 동작은 fail-closed SANDBOX_UNAVAILABLE입니다.
- 임의의 host command, network access 또는 제한 없는 job에 사용하지 않습니다. sandbox가 namespace, environment, timeout, process, memory 및 output을 제한합니다.
- 재현 가능한 실행이 중요할 때 revision pinning을 생략하지 않습니다. 명시적 revision은 다른 published snapshot이 실행되는 것을 막습니다.
필수 스코프
- 실행은 authorized skill operation이므로 MCP surface에 memory:write가 필요합니다.
- skill은 인증된 personal 또는 team scope 안에서 확인되어야 하며, cross-scope skill ID는 ACCESS_DENIED를 반환합니다.
매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
script_path | string | 실행할 script component의 logical path 또는 component ID입니다. |
slug | string · 기본값: empty | active skill을 확인하는 데 사용하는 skill slug입니다. |
skill_id | string · 기본값: empty | slug 대신 사용하는 안정적인 skill identity입니다. |
revision_id | string · 기본값: empty | 선택적 revision pin입니다. 없으면 published revision, 그 다음 latest revision을 선택합니다. |
input_args | object · 기본값: empty object | script의 stdin으로 encode되는 JSON-compatible value입니다. |
timeout_seconds | integer · 기본값: 30 | ExecutionLimits가 1–60초로 제한하는 실행 timeout입니다. |
반환 스키마
kind='execution'인 JSON CloudSkillResponseEnvelope를 반환하며, data에는 execution_id, skill_id, revision_id, script_path, runtime, status, exit_code, stdout, stderr, truncation flags, optional output_data, duration_ms, memory_peak_bytes, cpu_time_ms, timestamps 및 error_kind가 들어 있습니다.
예제
execute_cloud_skill({
slug: "deployment-procedure",
revision_id: "revision-id-from-root-recall",
script_path: "scripts/check.py",
input_args: { environment: "staging" },
timeout_seconds: 30
})오류
- ACCESS_DENIED, SKILL_NOT_FOUND, or SKILL_ARCHIVED: caller scope에서 skill을 확인할 수 없습니다.
- REVISION_NOT_FOUND: 요청한 revision이 skill에 속하지 않거나 active revision이 없습니다.
- SCRIPT_NOT_FOUND or INVALID_COMPONENT_TYPE: path가 없거나 script가 아닌 component를 가리킵니다.
- SANDBOX_UNAVAILABLE: host에 working bubblewrap isolation driver가 없고 unsafe fallback이 비활성화되어 있습니다.
- EXECUTION_TIMEOUT, RESOURCE_EXHAUSTED, or SCRIPT_EXECUTION_ERROR: watchdog, resource limit 또는 script exit status가 실행을 종료했습니다.
관련 도구
- recall_cloud_skill — 실행 전에 skill을 검색하고 revision/resource를 pin합니다.
- save_cloud_skill — 실행할 수 있는 procedure와 script component를 생성합니다.
- recall_context — 실행 task 주변의 bounded agent context를 구성합니다.
출처: Cloud Skills