Skip to main content
Glama

download_skill

Download a skill package for your AI platform. Specify skill ID and platform to get an auto-converted package ready for use.

Instructions

Download a skill package. Specify 'platform' to get an auto-converted package for that platform (ClaudeCode, Cursor, CodexCLI, GeminiCLI, etc.). / 스킬 패키지 다운로드 (플랫폼별 자동 변환).

Args: skill_id: 다운로드할 스킬 ID platform: 플랫폼 (OpenClaw, ClaudeCode, ClaudeCodeAgentSkill, CustomAgent, Cursor, GeminiCLI, CodexCLI). 비워두면 원본(.skill) 다운로드. save_dir: 저장 디렉터리 경로 (비워두면 임시 디렉터리에 저장)

Returns: 저장된 파일 경로 또는 오류 메시지

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skill_idYes
platformNo
save_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The @mcp.tool() decorator registers download_skill as an MCP tool.
    @mcp.tool()
  • The download_skill function: downloads a skill package from SKILL_STORE_URL, optionally converting for a specific platform. Saves to a specified or temp directory. Returns the save path or error message.
    @mcp.tool()
    @_log_tool
    def download_skill(skill_id: str, platform: str = "", save_dir: str = "") -> str:
        """
        Download a skill package. Specify 'platform' to get an auto-converted package for that platform (ClaudeCode, Cursor, CodexCLI, GeminiCLI, etc.). / 스킬 패키지 다운로드 (플랫폼별 자동 변환).
    
        Args:
            skill_id: 다운로드할 스킬 ID
            platform: 플랫폼 (OpenClaw, ClaudeCode, ClaudeCodeAgentSkill, CustomAgent, Cursor, GeminiCLI, CodexCLI). 비워두면 원본(.skill) 다운로드.
            save_dir: 저장 디렉터리 경로 (비워두면 임시 디렉터리에 저장)
    
        Returns:
            저장된 파일 경로 또는 오류 메시지
        """
        url = f"{SKILL_STORE_URL}/v1/agent/skills/{skill_id}/download"
        if platform:
            url += f"?platform={urllib.parse.quote(platform)}"
        try:
            req = urllib.request.Request(url)
            with urllib.request.urlopen(req, timeout=30) as resp:
                content_disposition = resp.headers.get("Content-Disposition", "")
                filename = f"{skill_id}.skill"
                if "filename=" in content_disposition:
                    filename = content_disposition.split("filename=")[-1].strip().strip('"')
    
                fallback = resp.headers.get("X-Fallback-Platform", "")
    
                target_dir = save_dir if save_dir else tempfile.mkdtemp(prefix="skill_store_")
                os.makedirs(target_dir, exist_ok=True)
                save_path = os.path.join(target_dir, filename)
    
                with open(save_path, "wb") as f:
                    f.write(resp.read())
    
            msg = f"✅ 다운로드 완료: {save_path}"
            if platform:
                msg += f"\n   플랫폼: {platform}"
            if fallback:
                msg += f"\n   ⚠️ 요청한 플랫폼 변환 불가 → {fallback} 형식으로 대체 제공됨"
            return msg
        except urllib.error.HTTPError as e:
            body = ""
            try:
                body = e.read().decode()
                body = json.loads(body).get("message", body)
            except Exception:
                pass
            return f"❌ 다운로드 실패: HTTP {e.code} — {body or e.reason}"
        except Exception as e:
            return f"❌ 오류: {str(e)}"
  • Function signature and docstring define the schema: skill_id (str, required), platform (str, optional default ''), save_dir (str, optional default '').
    def download_skill(skill_id: str, platform: str = "", save_dir: str = "") -> str:
        """
        Download a skill package. Specify 'platform' to get an auto-converted package for that platform (ClaudeCode, Cursor, CodexCLI, GeminiCLI, etc.). / 스킬 패키지 다운로드 (플랫폼별 자동 변환).
    
        Args:
            skill_id: 다운로드할 스킬 ID
            platform: 플랫폼 (OpenClaw, ClaudeCode, ClaudeCodeAgentSkill, CustomAgent, Cursor, GeminiCLI, CodexCLI). 비워두면 원본(.skill) 다운로드.
            save_dir: 저장 디렉터리 경로 (비워두면 임시 디렉터리에 저장)
    
        Returns:
            저장된 파일 경로 또는 오류 메시지
        """
  • The @_log_tool decorator wraps the function for logging on each call.
    @mcp.tool()
  • The _log_tool helper decorator that logs tool calls to stdout.
    def _log_tool(fn):
        """각 MCP tool 호출을 stdout 에 한 줄 기록 — journalctl 에서 grep 가능.
        형식: TOOL_CALL tool=<name> kw=<arg_keys>  (PII 회피 위해 값은 로그 X)
        """
        @_functools_tool.wraps(fn)
        def _wrapper(*args, **kwargs):
            try:
                kw_keys = list(kwargs.keys())
                print(f"TOOL_CALL tool={fn.__name__} kw={kw_keys}", flush=True)
            except Exception:
                pass
            return fn(*args, **kwargs)
        return _wrapper
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses platform conversion and default save behavior but does not mention whether the operation is read-only, authentication needs, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two paragraphs, a clear Args list, and Returns section. No unnecessary sentences, well-structured for quick parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the existence of an output schema, the description adequately covers return values (file path or error). For a simple tool with 3 params, it is nearly complete, though could mention if overwriting occurs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds value by explaining the platform options (enum list), default behaviors (original .skill download, temporary directory), and the purpose of each parameter beyond their titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Download a skill package' and specifies the platform conversion feature. It distinguishes from siblings like get_skill (which likely retrieves metadata) by focusing on file download.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to specify platform but does not provide explicit guidance on when to use download vs other tools like get_skill. No alternatives or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/garasegae/aiskillstore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server