list_apps
Retrieve all applications in your Codemagic account to manage builds and deployments.
Instructions
List all applications in your Codemagic account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- codemagic_mcp/tools/apps.py:11-14 (handler)The MCP tool handler for 'list_apps'. It creates a CodemagicClient and delegates to client.list_apps().
async def list_apps() -> Any: """List all applications in your Codemagic account.""" async with CodemagicClient() as client: return await client.list_apps() - codemagic_mcp/tools/apps.py:11-11 (schema)No input schema is defined since list_apps takes no arguments; it returns Any.
async def list_apps() -> Any: - codemagic_mcp/tools/apps.py:9-14 (registration)Registration of list_apps via @mcp.tool() decorator inside the register() function, which is called from register_all_tools() in tools/__init__.py, then from server.py.
def register(mcp: FastMCP) -> None: @mcp.tool() async def list_apps() -> Any: """List all applications in your Codemagic account.""" async with CodemagicClient() as client: return await client.list_apps() - codemagic_mcp/client.py:66-71 (helper)The client. list_apps() helper method: sends GET /apps, extracts applications from the response, trims each app via _trim_app() and returns the list.
async def list_apps(self) -> Any: data = await self._get("/apps") apps = data.get("applications", data) if isinstance(data, dict) else data if isinstance(apps, list): return [self._trim_app(a) for a in apps] return apps - codemagic_mcp/client.py:48-64 (helper)The _trim_app() helper used by list_apps to normalize app data into a consistent shape.
def _trim_app(self, app: dict) -> dict: repo = app.get("repository") or {} return { "_id": app.get("_id"), "appName": app.get("appName"), "projectType": app.get("projectType"), "archived": app.get("archived"), "isConfigured": app.get("isConfigured"), "lastBuildId": app.get("lastBuildId"), "createdAt": app.get("createdAt"), "repository": { "url": repo.get("htmlUrl"), "provider": repo.get("provider"), "defaultBranch": repo.get("defaultBranch"), "language": repo.get("language"), }, }