skills_search
Search a global registry of community-contributed AI agent skills to extend capabilities for specialized tasks and workflows.
Instructions
Search the extended Agent Skills Registry. Use this tool WHENEVER the user asks to 'find skills', 'search skills', or needs capabilities that you do not natively possess (e.g. specialized file handling, complex workflows). This registry contains community-contributed skills that extend your native capabilities.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search keywords | |
| page | No | Page number | |
| limit | No | Items per page |
Implementation Reference
- src/skills_mcp/server.py:11-35 (handler)The main execution logic for the 'skills_search' MCP tool. It creates a RegistryClient, performs the search, formats the results into a readable list, and handles errors.def skills_search( query: str = Field(description="Search keywords"), page: int = Field(default=1, description="Page number"), limit: int = Field(default=10, description="Items per page") ) -> str: """ Search the extended Agent Skills Registry. Use this tool WHENEVER the user asks to 'find skills', 'search skills', or needs capabilities that you do not natively possess (e.g. specialized file handling, complex workflows). This registry contains community-contributed skills that extend your native capabilities. """ client = api.RegistryClient() try: results = client.search(query, page, limit) # Format for LLM # 优先取 "skills",为了兼容性也 fallback 到 "items" items = results.get("skills", results.get("items", [])) if not items: return "No skills found matching your query." output = [f"Found {len(items)} skills (Page {page}):"] for item in items: output.append(f"- {item['name']} (v{item.get('version', '?')}): {item['description']}") return "\n".join(output) except Exception as e: return f"Error searching skills: {str(e)}"
- src/skills_mcp/server.py:12-14 (schema)Pydantic input schema definitions for the skills_search tool parameters using Field for descriptions and defaults.query: str = Field(description="Search keywords"), page: int = Field(default=1, description="Page number"), limit: int = Field(default=10, description="Items per page")
- src/skills_mcp/server.py:10-10 (registration)The @mcp.tool() decorator registers the skills_search function as an available tool in the FastMCP server.@mcp.tool()
- src/skills_mcp/api.py:14-27 (helper)Supporting helper method in RegistryClient that executes the HTTP GET request to the skills registry search endpoint and handles responses/errors.def search(self, query: str = "", page: int = 1, limit: int = 20) -> Dict[str, Any]: """Search skills from the registry.""" params = {"q": query, "page": page, "limit": limit} try: resp = httpx.get(f"{self.base_url}/skills", params=params, headers=self.headers, timeout=10.0) resp.raise_for_status() return resp.json() except httpx.HTTPStatusError as e: if e.response.status_code == 401: raise PermissionError("Registry authentication failed. Check SKILLS_API_KEY.") raise RuntimeError(f"Registry error: {e.response.text}") except httpx.RequestError as e: raise RuntimeError(f"Network error connecting to registry: {str(e)}")