get_available_skills
Discover available AI skills by parsing skill metadata to provide LLMs with a list of capabilities and use cases before accessing detailed information.
Instructions
Get an overview of all available skills.
This tool provides LLMs with a list of available skills and their use cases by parsing the frontmatter (YAML metadata) at the start of each SKILL.md file.
LLMs should rely on this tool to discover what skills are available before requesting detailed skill information.
Returns
list[dict[str, str]] List of skill metadata dictionaries, each containing: - name: The skill identifier (lowercase, hyphens only) - description: When and how to use this skill - path: Location of the skill directory
Examples
skills = get_available_skills() print(skills[0]["name"]) 'single-cell-rna-qc'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/skill_to_mcp/tools/_skills.py:23-48 (handler)The handler function for the 'get_available_skills' tool. Decorated with @mcp_server.tool() to register it. Calls SkillParser.find_all_skills() to get skill metadata and returns it as a list of dictionaries. The docstring provides schema information including return type and structure.@mcp_server.tool() def get_available_skills() -> list[dict[str, str]]: """Get an overview of all available skills. This tool provides LLMs with a list of available skills and their use cases by parsing the frontmatter (YAML metadata) at the start of each SKILL.md file. LLMs should rely on this tool to discover what skills are available before requesting detailed skill information. Returns ------- list[dict[str, str]] List of skill metadata dictionaries, each containing: - name: The skill identifier (lowercase, hyphens only) - description: When and how to use this skill - path: Location of the skill directory Examples -------- >>> skills = get_available_skills() >>> print(skills[0]["name"]) 'single-cell-rna-qc' """ skills = skill_parser.find_all_skills() return [skill.to_dict() for skill in skills]
- src/skill_to_mcp/mcp.py:31-33 (registration)Registers all skill tools, including 'get_available_skills', by calling register_skill_tools during MCP server initialization.from skill_to_mcp.tools._skills import register_skill_tools register_skill_tools(mcp_server, skills_dir)
- Helper method in SkillParser that implements the core logic for discovering all skills by recursively searching for SKILL.md files, parsing their YAML frontmatter, and returning SkillMetadata objects.def find_all_skills(self) -> list[SkillMetadata]: """Find all SKILL.md files and parse their metadata. Returns ------- list[SkillMetadata] List of skill metadata objects. """ skills = [] for skill_md in self.skills_directory.rglob("SKILL.md"): try: metadata = self.parse_skill_metadata(skill_md) skills.append(metadata) except (ValueError, OSError) as e: # Log error but continue processing other skills print(f"Error parsing {skill_md}: {e}") continue return skills
- Helper method in SkillMetadata class that converts the metadata object to the dictionary format returned by get_available_skills.def to_dict(self) -> dict[str, str]: """Convert metadata to dictionary. Returns ------- dict[str, str] Dictionary with name, description, and path. """ return { "name": self.name, "description": self.description, "path": str(self.skill_path), }