Skip to main content
Glama

update_variable

Modify environment variables in Codemagic CI/CD applications to configure build settings, update secrets, or adjust deployment parameters.

Instructions

Update an existing environment variable for a Codemagic application.

Args: app_id: The Codemagic application ID. variable_id: The variable ID to update. key: The variable name. value: The new variable value. group: The variable group name. secure: Whether the variable should be encrypted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYes
variable_idYes
keyYes
valueYes
groupYes
secureNo

Implementation Reference

  • The tool handler definition for `update_variable` in the MCP server tools, which invokes the `CodemagicClient`.
    async def update_variable(
        app_id: str,
        variable_id: str,
        key: str,
        value: str,
        group: str,
        secure: bool = False,
    ) -> Any:
        """Update an existing environment variable for a Codemagic application.
    
        Args:
            app_id: The Codemagic application ID.
            variable_id: The variable ID to update.
            key: The variable name.
            value: The new variable value.
            group: The variable group name.
            secure: Whether the variable should be encrypted.
        """
        async with CodemagicClient() as client:
            return await client.update_variable(
                app_id=app_id,
                variable_id=variable_id,
                key=key,
                value=value,
                group=group,
                secure=secure,
            )
  • The underlying API client implementation for updating a variable, which performs the PUT request to the Codemagic API.
    async def update_variable(
        self,
        app_id: str,
        variable_id: str,
        key: str,
        value: str,
        group: str,
        secure: bool = False,
    ) -> Any:
        return await self._put(
            f"/apps/{app_id}/variables/{variable_id}",
            json={"key": key, "value": value, "group": group, "secure": secure},
        )

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