Skip to main content
Glama

delete_variable

Destructive

Remove a specific environment variable from a Codemagic app using its app ID and variable ID.

Instructions

Delete an environment variable from a Codemagic application.

Args: app_id: The Codemagic application ID. variable_id: The variable ID to delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYes
variable_idYes

Implementation Reference

  • The MCP tool handler for 'delete_variable'. Registered as a tool with destructiveHint=True annotation. Calls client.delete_variable to execute the deletion.
    @mcp.tool(annotations=ToolAnnotations(destructiveHint=True))
    async def delete_variable(app_id: str, variable_id: str) -> Any:
        """Delete an environment variable from a Codemagic application.
    
        Args:
            app_id: The Codemagic application ID.
            variable_id: The variable ID to delete.
        """
        async with CodemagicClient() as client:
            return await client.delete_variable(app_id, variable_id)
  • The HTTP client method that executes the API call. Sends a DELETE request to /apps/{app_id}/variables/{variable_id}.
    async def delete_variable(self, app_id: str, variable_id: str) -> Any:
        return await self._delete(f"/apps/{app_id}/variables/{variable_id}")
  • Registration entry point. register_all_tools calls variables.register(mcp) which registers the delete_variable tool.
    def register_all_tools(mcp: FastMCP) -> None:
        apps.register(mcp)
        builds.register(mcp)
        artifacts.register(mcp)
        caches.register(mcp)
        variables.register(mcp)
        webhooks.register(mcp)
  • Server initialization and instructions listing delete_variable as one of the destructive operations requiring user confirmation.
    mcp = FastMCP(
        name="Codemagic MCP",
        instructions=(
            "Codemagic CI/CD REST API: manage builds, apps, artifacts, caches, variables, and webhooks.\n\n"
            "Destructive ops (delete_app, cancel_build, delete_cache, delete_all_caches, delete_variable, delete_webhook): confirm before executing.\n\n"
            "App ID resolution: (1) use explicit app_id; (2) use CODEMAGIC_DEFAULT_APP_ID if set (exposed as `default_app_id`); "
            "(3) call list_apps — auto-select if one result, else ask user."
        ),
        lifespan=lifespan,
    )
Behavior3/5

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

The annotation 'destructiveHint': true indicates destruction, and the description uses 'Delete,' which aligns. However, no additional behavioral traits (e.g., irreversibility, permissions) are disclosed. With annotations covering the destructive nature, the description adds minimal extra transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the action. The 'Args' section is somewhat redundant with the schema but not overly verbose. It efficiently communicates the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no output schema and low schema coverage, the description provides the essential delete action and required parameters. However, it omits return behavior or side effects, leaving gaps for a fully informed agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description's argument list provides only trivial context ('The Codemagic application ID,' 'The variable ID to delete'), barely adding meaning beyond the schema. It repeats parameter names with minimal elaboration.

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 'Delete an environment variable from a Codemagic application,' using a specific verb and resource. It distinguishes from sibling tools like 'add_variable' and 'update_variable'.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool vs alternatives, such as prerequisites or conditions. The description lacks any contextual usage advice.

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/AgiMaulana/CodemagicMcp'

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