list_variables
Retrieve all environment variables configured for a Codemagic application. Input the app ID to get a complete list.
Instructions
List all environment variables for a Codemagic application.
Args: app_id: The Codemagic application ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes |
Implementation Reference
- codemagic_mcp/tools/variables.py:11-18 (handler)The MCP tool handler for 'list_variables'. Defines the function decorated with @mcp.tool() that accepts an app_id and delegates to the client.
async def list_variables(app_id: str) -> Any: """List all environment variables for a Codemagic application. Args: app_id: The Codemagic application ID. """ async with CodemagicClient() as client: return await client.list_variables(app_id) - codemagic_mcp/client.py:426-427 (helper)The CodemagicClient method that sends a GET request to /apps/{app_id}/variables to fetch the list of environment variables.
async def list_variables(self, app_id: str) -> Any: return await self._get(f"/apps/{app_id}/variables") - codemagic_mcp/tools/__init__.py:6-12 (registration)The registration hub that calls variables.register(mcp), which registers the list_variables tool (among others) via the @mcp.tool() decorator.
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) - codemagic_mcp/server.py:46-48 (registration)Server entry point that calls register_all_tools(mcp) on line 43, which triggers the registration of list_variables.
def main() -> None: mcp.run(transport="stdio")