Skip to main content
Glama

skills_get_details

Retrieve documentation and file structure for installed skills to understand their functionality and usage instructions.

Instructions

Read the instruction manual (SKILL.md) and file structure of a locally installed skill. Use this to learn how to use a skill after installing it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the installed skill

Implementation Reference

  • The handler function for the 'skills_get_details' tool, including registration via @mcp.tool() decorator and Pydantic schema via Field. Formats output from local.get_details.
    @mcp.tool()
    def skills_get_details(
        name: str = Field(description="Name of the installed skill")
    ) -> str:
        """
        Read the instruction manual (SKILL.md) and file structure of a locally installed skill.
        Use this to learn how to use a skill after installing it.
        """
        try:
            details = local.get_details(name)
            return f"""# Skill: {name}
    Path: {details['path']}
    
    ## File Structure
    ```
    {details['tree']}
    ```
    
    ## Instructions
    {details['instruction']}
    """
        except Exception as e:
            return f"Error getting details: {str(e)}"
  • Core helper function that implements the logic to retrieve skill details: path, file tree, and SKILL.md content.
    def get_details(name: str) -> Dict[str, str]:
        target_dir = config.root_dir / name
        if not target_dir.exists():
            raise FileNotFoundError(f"Skill '{name}' is not installed locally.")
    
        skill_md = target_dir / "SKILL.md"
        if not skill_md.exists():
            raise FileNotFoundError(f"Corrupted skill '{name}': SKILL.md missing.")
    
        return {
            "path": str(target_dir),
            "tree": generate_tree(target_dir),
            "instruction": skill_md.read_text(encoding="utf-8")
        }
  • Supporting utility to generate a filtered visual file tree of the skill directory, used by get_details.
    def generate_tree(root_path: Path) -> str:
        """Generates a visual file tree string, filtering out noise."""
        output = []
    
        # Walk the directory
        for dirpath, dirnames, filenames in os.walk(root_path):
            # 1. In-place filtering of directories to prevent recursion into ignored dirs
            dirnames[:] = [d for d in dirnames if d not in IGNORED_DIRS and not d.startswith(".")]
    
            rel_path = Path(dirpath).relative_to(root_path)
    
            if rel_path == Path("."):
                level = 0
            else:
                level = len(rel_path.parts)
                indent = "  " * (level - 1)
                output.append(f"{indent}- {rel_path.name}/")
    
            sub_indent = "  " * level
            for f in sorted(filenames):
                if f in IGNORED_FILES or f.startswith("."):
                    continue
                if any(f.endswith(ext) for ext in IGNORED_EXTENSIONS):
                    continue
    
                output.append(f"{sub_indent}- {f}")
    
        return "\n".join(output)

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/leezhuuuuu/skills-mcp'

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