Skip to main content
Glama
fkesheh

Skill Management MCP Server

by fkesheh

skill_env_crud

Manage environment variables for skills by reading keys, setting values, deleting entries, or clearing all variables through unified CRUD operations.

Instructions

Unified CRUD tool for skill environment variable operations. Supports single and bulk operations.

Operations:

  • read: Read all environment variable keys (values are hidden for security)

  • set: Set one or more environment variables (merges with existing)

  • delete: Delete one or more environment variables

  • clear: Clear all environment variables

Examples:

// Read all env var keys
{
  "operation": "read",
  "skill_name": "my-skill"
}

// Set single variable (merges with existing)
{
  "operation": "set",
  "skill_name": "my-skill",
  "variables": {"API_KEY": "sk-123"}
}

// Set multiple variables (bulk merge)
{
  "operation": "set",
  "skill_name": "my-skill",
  "variables": {
    "API_KEY": "sk-123",
    "DEBUG": "true",
    "TIMEOUT": "30"
  }
}

// Delete single variable
{
  "operation": "delete",
  "skill_name": "my-skill",
  "keys": ["API_KEY"]
}

// Delete multiple variables
{
  "operation": "delete",
  "skill_name": "my-skill",
  "keys": ["API_KEY", "DEBUG", "TIMEOUT"]
}

// Clear all environment variables
{
  "operation": "clear",
  "skill_name": "my-skill"
}

Note: The 'set' operation always merges with existing variables. To replace everything, use 'clear' first, then 'set'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesOperation to perform: 'read', 'set', 'delete', 'clear'
skill_nameYesName of the skill
variablesNoVariables to set (key-value pairs for 'set' operation)
keysNoVariable keys to delete (for 'delete' operation)

Implementation Reference

  • Main handler function for the skill_env_crud tool. Dispatches CRUD operations (read, set, delete, clear) to private helper methods.
    @staticmethod
    async def skill_env_crud(input_data: SkillEnvCrudInput) -> list[types.TextContent]:
        """Handle environment variable CRUD operations."""
        operation = input_data.operation
    
        try:
            if operation == "read":
                return await SkillEnvCrud._handle_read(input_data)
            elif operation == "set":
                return await SkillEnvCrud._handle_set(input_data)
            elif operation == "delete":
                return await SkillEnvCrud._handle_delete(input_data)
            elif operation == "clear":
                return await SkillEnvCrud._handle_clear(input_data)
            else:
                return [
                    types.TextContent(
                        type="text",
                        text=f"Unknown operation: {operation}. Valid operations: read, set, delete, clear",
                    )
                ]
        except Exception as e:
            return [types.TextContent(type="text", text=f"Error: {str(e)}")]
  • Pydantic BaseModel defining the input schema for the skill_env_crud tool, including operation, skill_name, variables, and keys.
    class SkillEnvCrudInput(BaseModel):
        """Unified input for skill environment variable CRUD operations."""
    
        operation: str = Field(description="Operation to perform: 'read', 'set', 'delete', 'clear'")
        skill_name: str = Field(description="Name of the skill")
    
        # Set operations (single or bulk)
        variables: Optional[Dict[str, str]] = Field(
            default=None, description="Variables to set (key-value pairs for 'set' operation)"
        )
    
        # Delete operations (single or bulk)
        keys: Optional[List[str]] = Field(
            default=None, description="Variable keys to delete (for 'delete' operation)"
        )
  • MCP server tool listing handler that registers the skill_env_crud tool by including SkillEnvCrud.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
  • Dispatch registration in MCP server's call_tool handler for invoking the skill_env_crud tool.
    elif name == "skill_env_crud":
        env_input = SkillEnvCrudInput(**arguments)
        return await SkillEnvCrud.skill_env_crud(env_input)
  • Tool definition method providing the Tool object with name, description, and inputSchema reference for registration in list_tools.
        @staticmethod
        def get_tool_definition() -> list[types.Tool]:
            """Get tool definition."""
            return [
                types.Tool(
                    name="skill_env_crud",
                    description="""Unified CRUD tool for skill environment variable operations. Supports single and bulk operations.
    
    **Operations:**
    - **read**: Read all environment variable keys (values are hidden for security)
    - **set**: Set one or more environment variables (merges with existing)
    - **delete**: Delete one or more environment variables
    - **clear**: Clear all environment variables
    
    **Examples:**
    ```json
    // Read all env var keys
    {
      "operation": "read",
      "skill_name": "my-skill"
    }
    
    // Set single variable (merges with existing)
    {
      "operation": "set",
      "skill_name": "my-skill",
      "variables": {"API_KEY": "sk-123"}
    }
    
    // Set multiple variables (bulk merge)
    {
      "operation": "set",
      "skill_name": "my-skill",
      "variables": {
        "API_KEY": "sk-123",
        "DEBUG": "true",
        "TIMEOUT": "30"
      }
    }
    
    // Delete single variable
    {
      "operation": "delete",
      "skill_name": "my-skill",
      "keys": ["API_KEY"]
    }
    
    // Delete multiple variables
    {
      "operation": "delete",
      "skill_name": "my-skill",
      "keys": ["API_KEY", "DEBUG", "TIMEOUT"]
    }
    
    // Clear all environment variables
    {
      "operation": "clear",
      "skill_name": "my-skill"
    }
    ```
    
    **Note:** The 'set' operation always merges with existing variables. To replace everything, use 'clear' first, then 'set'.""",
                    inputSchema=SkillEnvCrudInput.model_json_schema(),
                )
            ]
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: 'read' hides values for security, 'set' merges with existing variables, and 'clear' removes all. It also explains the relationship between operations (use 'clear' then 'set' to replace everything). It doesn't mention authentication needs, rate limits, or error handling, keeping it from a perfect score.

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 well-structured with clear sections (operations, examples, note), front-loaded with the purpose and operations. Every sentence earns its place by providing essential information or examples. The examples are concise and illustrative without unnecessary verbosity.

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 no annotations and no output schema, the description does a good job covering operations, parameters, and behaviors. It includes examples that clarify usage. However, it lacks information on return values (since no output schema) and doesn't mention potential errors or side effects, which would be helpful for a mutation tool with multiple operations.

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 description coverage is 100%, so the baseline is 3. The description adds significant value by explaining parameter usage through examples and clarifying that 'variables' is for 'set' and 'keys' is for 'delete'. It also notes that 'set' merges and 'clear' requires only 'skill_name'. However, it doesn't fully explain all parameter interactions (e.g., when 'variables' or 'keys' can be null), preventing a perfect score.

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 the tool performs CRUD operations on skill environment variables, specifying the four operations (read, set, delete, clear). It distinguishes from siblings by focusing on environment variables rather than skills themselves (skill_crud) or skill files (skill_files_crud). The description goes beyond the name/title by detailing the specific operations supported.

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

Usage Guidelines4/5

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

The description provides clear context for when to use each operation (e.g., 'set' merges, 'clear' removes all) and includes a note about replacing all variables by combining 'clear' and 'set'. However, it doesn't explicitly contrast when to use this tool versus sibling tools like skill_crud or skill_files_crud, which would be needed for a perfect score.

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

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