Skip to main content
Glama
fkesheh

Skill Management MCP Server

by fkesheh

skill_crud

Create, list, search, get, validate, and delete reusable skills stored locally for the Skill Management MCP Server.

Instructions

Unified CRUD tool for skill management.

IMPORTANT NOTES:

  • Skills are stored in ~/.skill-mcp/skills directory

  • All file paths in responses are relative to the skill directory (e.g., 'main.py', not full paths)

  • To execute scripts, use the 'run_skill_script' tool, NOT external bash/shell tools

Operations:

  • create: Create a new skill with templates (basic, python, bash, nodejs)

  • list: List all skills with optional search (supports text and regex)

  • search: Search for skills by pattern (text or regex)

  • get: Get detailed information about a specific skill

  • validate: Validate skill structure and get diagnostics

  • delete: Delete a skill directory (requires confirm=true)

  • list_templates: List all available skill templates with descriptions

Examples:

// List available templates
{"operation": "list_templates"}

// Create a Python skill
{"operation": "create", "skill_name": "my-skill", "description": "My skill", "template": "python"}

// List all skills
{"operation": "list"}

// Search skills by text
{"operation": "search", "search": "weather"}

// Search skills by regex pattern
{"operation": "search", "search": "^api-"}

// Get skill details
{"operation": "get", "skill_name": "my-skill", "include_content": true}

// Validate skill
{"operation": "validate", "skill_name": "my-skill"}

// Delete skill
{"operation": "delete", "skill_name": "my-skill", "confirm": true}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesOperation to perform: 'create', 'list', 'get', 'validate', 'delete'
skill_nameNoName of the skill (required for get, validate, delete, create)
descriptionNoSkill description (optional for create)
templateNoTemplate to use for create: 'basic', 'python', 'bash', 'nodejs'basic
searchNoSearch pattern for list (text or regex)
include_contentNoInclude SKILL.md content in get operation
confirmNoConfirm delete operation (required for delete)

Implementation Reference

  • Main handler `skill_crud` dispatching to operation-specific private methods.
    async def skill_crud(input_data: SkillCrudInput) -> list[types.TextContent]:
        """Handle skill CRUD operations."""
        operation = input_data.operation
    
        try:
            if operation == "list":
                return await SkillCrud._handle_list(input_data)
            elif operation == "search":
                return await SkillCrud._handle_search(input_data)
            elif operation == "get":
                return await SkillCrud._handle_get(input_data)
            elif operation == "validate":
                return await SkillCrud._handle_validate(input_data)
            elif operation == "delete":
                return await SkillCrud._handle_delete(input_data)
            elif operation == "create":
                return await SkillCrud._handle_create(input_data)
            elif operation == "list_templates":
                return await SkillCrud._handle_list_templates(input_data)
            else:
                return [
                    types.TextContent(
                        type="text",
                        text=f"Unknown operation: {operation}. Valid operations: create, list, search, get, validate, delete, list_templates",
                    )
                ]
        except Exception as e:
            return [types.TextContent(type="text", text=f"Error: {str(e)}")]
  • Pydantic input schema `SkillCrudInput` used by the tool.
    class SkillCrudInput(BaseModel):
        """Unified input for skill CRUD operations."""
    
        operation: str = Field(
            description="Operation to perform: 'create', 'list', 'get', 'validate', 'delete'"
        )
        skill_name: Optional[str] = Field(
            default=None, description="Name of the skill (required for get, validate, delete, create)"
        )
        description: Optional[str] = Field(
            default=None, description="Skill description (optional for create)"
        )
        template: Optional[str] = Field(
            default="basic",
            description="Template to use for create: 'basic', 'python', 'bash', 'nodejs'",
        )
        search: Optional[str] = Field(
            default=None, description="Search pattern for list (text or regex)"
        )
        include_content: bool = Field(
            default=False, description="Include SKILL.md content in get operation"
        )
        confirm: bool = Field(
            default=False, description="Confirm delete operation (required for delete)"
        )
  • Tool definition including name, description, and inputSchema reference.
        def get_tool_definition() -> list[types.Tool]:
            """Get tool definition."""
            return [
                types.Tool(
                    name="skill_crud",
                    description="""Unified CRUD tool for skill management.
    
    IMPORTANT NOTES:
    - Skills are stored in ~/.skill-mcp/skills directory
    - All file paths in responses are relative to the skill directory (e.g., 'main.py', not full paths)
    - To execute scripts, use the 'run_skill_script' tool, NOT external bash/shell tools
    
    **Operations:**
    - **create**: Create a new skill with templates (basic, python, bash, nodejs)
    - **list**: List all skills with optional search (supports text and regex)
    - **search**: Search for skills by pattern (text or regex)
    - **get**: Get detailed information about a specific skill
    - **validate**: Validate skill structure and get diagnostics
    - **delete**: Delete a skill directory (requires confirm=true)
    - **list_templates**: List all available skill templates with descriptions
    
    **Examples:**
    ```json
    // List available templates
    {"operation": "list_templates"}
    
    // Create a Python skill
    {"operation": "create", "skill_name": "my-skill", "description": "My skill", "template": "python"}
    
    // List all skills
    {"operation": "list"}
    
    // Search skills by text
    {"operation": "search", "search": "weather"}
    
    // Search skills by regex pattern
    {"operation": "search", "search": "^api-"}
    
    // Get skill details
    {"operation": "get", "skill_name": "my-skill", "include_content": true}
    
    // Validate skill
    {"operation": "validate", "skill_name": "my-skill"}
    
    // Delete skill
    {"operation": "delete", "skill_name": "my-skill", "confirm": true}
    ```""",
                    inputSchema=SkillCrudInput.model_json_schema(),
                )
            ]
  • MCP server registration: adds skill_crud to list_tools via get_tool_definition()
    @app.list_tools()  # type: ignore[misc]
    async def list_tools() -> list[types.Tool]:
        """List available tools."""
        tools = []
        tools.extend(SkillCrud.get_tool_definition())
        tools.extend(SkillFilesCrud.get_tool_definition())
        tools.extend(SkillEnvCrud.get_tool_definition())
        tools.extend(ScriptTools.get_script_tools())
        return tools
  • MCP server call_tool dispatch: handles calls to skill_crud tool.
    if name == "skill_crud":
        skill_input = SkillCrudInput(**arguments)
        return await SkillCrud.skill_crud(skill_input)

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/fkesheh/skill-mcp'

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