get_skill_schema
Retrieve the complete skill invocation schema, including interface specification, input/output schemas, permissions, and capability tags.
Instructions
Get the full schema for invoking a skill - interface spec, input/output schemas, permissions, and capability tags. / 스킬 호출용 전체 스키마 조회. 인터페이스, 입출력 스키마, 권한, 능력 태그 등을 반환합니다.
Args: skill_id: 스킬 ID
Returns: 스킬 호출 스키마 정보
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skill_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- mcp_server/skill_store_mcp.py:269-334 (handler)The core handler for the 'get_skill_schema' MCP tool. Fetches the full skill schema from the API (interface, input/output schemas, permissions, capabilities, etc.) and formats it as a human-readable string.
@mcp.tool() @_log_tool def get_skill_schema(skill_id: str) -> str: """ Get the full schema for invoking a skill - interface spec, input/output schemas, permissions, and capability tags. / 스킬 호출용 전체 스키마 조회. 인터페이스, 입출력 스키마, 권한, 능력 태그 등을 반환합니다. Args: skill_id: 스킬 ID Returns: 스킬 호출 스키마 정보 """ result = _get(f"/v1/agent/skills/{skill_id}/schema") if result.get("status") == "error": return f"오류: {result.get('message')}" iface = result.get("interface", {}) perms = result.get("permissions", {}) caps = result.get("capabilities", []) compat = result.get("platform_compatibility", []) reqs = result.get("requirements", {}) lines = [ f"📋 {result.get('name')} v{result.get('version', '')}", f"신뢰: {result.get('trust_level', '')} | " f"USK v3: {'✅' if result.get('is_usk_v3') else '❌'} | " f"자동변환: {'✅' if result.get('can_auto_convert') else '❌'}", "", "── Interface ──", f" type: {iface.get('type', 'N/A')}", f" entry_point: {iface.get('entry_point', 'N/A')}", f" runtime: {iface.get('runtime', 'N/A')}", f" call_pattern: {iface.get('call_pattern', 'N/A')}", "", "── Input Schema ──", json.dumps(result.get("input_schema", {}), indent=2, ensure_ascii=False), "", "── Output Schema ──", json.dumps(result.get("output_schema", {}), indent=2, ensure_ascii=False), "", "── Capabilities ──", ", ".join(caps) if caps else "없음", "", "── Permissions ──", f" network: {perms.get('network', False)}", f" filesystem: {perms.get('filesystem', False)}", f" subprocess: {perms.get('subprocess', False)}", f" env_vars: {', '.join(perms.get('env_vars', [])) or '없음'}", "", f"플랫폼 호환: {', '.join(compat) if compat else 'any'}", ] if reqs: lines.append("") lines.append("── Requirements ──") for k, v in reqs.items(): lines.append(f" {k}: {v}") dl = result.get("download", {}) if dl.get("platforms"): lines.append("") lines.append(f"다운로드: download_skill(skill_id=\"{skill_id}\", platform=\"<platform>\")") lines.append(f"지원 플랫폼: {', '.join(dl['platforms'])}") return "\n".join(lines) - mcp_server/skill_store_mcp.py:269-270 (registration)The @mcp.tool() decorator registers get_skill_schema as an MCP tool with the FastMCP server instance.
@mcp.tool() @_log_tool - The tool takes a single parameter 'skill_id' (string) and returns a string.
def get_skill_schema(skill_id: str) -> str: - mcp_server/skill_store_mcp.py:85-95 (helper)The _get helper function used by get_skill_schema to make the GET request to /v1/agent/skills/{skill_id}/schema.
def _get(path: str, params: dict = None) -> dict: url = SKILL_STORE_URL + path if params: url += "?" + urllib.parse.urlencode({k: v for k, v in params.items() if v is not None}) try: with urllib.request.urlopen(url, timeout=10) as resp: return json.loads(resp.read().decode()) except urllib.error.HTTPError as e: return {"status": "error", "message": f"HTTP {e.code}: {e.reason}"} except Exception as e: return {"status": "error", "message": str(e)}