Skip to main content
Glama

list_builds

Retrieve Codemagic builds filtered by app, branch, or tag. Paginate results to browse build history.

Instructions

List Codemagic builds, optionally filtered by app, branch, and/or tag.

Args: app_id: Optional app ID to filter builds. If omitted, returns builds across all apps. branch: Optional branch name to filter builds (e.g. "main"). tag: Optional tag name to filter builds (e.g. "release_v5.57.2"). limit: Number of builds per page (default 10). page: Page number to retrieve, starting from 1 (default 1).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idNo
branchNo
tagNo
limitNo
pageNo

Implementation Reference

  • MCP tool handler for 'list_builds'. Decorated with @mcp.tool(), accepts optional filters (app_id, branch, tag, limit, page) and delegates to CodemagicClient.list_builds().
    @mcp.tool()
    async def list_builds(
        app_id: str | None = None,
        branch: str | None = None,
        tag: str | None = None,
        limit: int = 10,
        page: int = 1,
    ) -> Any:
        """List Codemagic builds, optionally filtered by app, branch, and/or tag.
    
        Args:
            app_id: Optional app ID to filter builds. If omitted, returns builds across all apps.
            branch: Optional branch name to filter builds (e.g. "main").
            tag: Optional tag name to filter builds (e.g. "release_v5.57.2").
            limit: Number of builds per page (default 10).
            page: Page number to retrieve, starting from 1 (default 1).
        """
        async with CodemagicClient() as client:
            return await client.list_builds(
                app_id=app_id, branch=branch, tag=tag, limit=limit, page=page
            )
  • Input parameters for the list_builds tool: app_id (optional), branch (optional), tag (optional), limit (default 10), page (default 1).
    async def list_builds(
        app_id: str | None = None,
        branch: str | None = None,
        tag: str | None = None,
        limit: int = 10,
        page: int = 1,
    ) -> Any:
  • CodemagicClient.list_builds() - API client method that sends GET /builds with optional query params (appId, branch, tag) and returns paginated build results with id, status, branch, tag, workflowId, workflowName, appId, timestamps.
    async def list_builds(
        self,
        app_id: str | None = None,
        branch: str | None = None,
        tag: str | None = None,
        limit: int = 10,
        page: int = 1,
    ) -> Any:
        params: dict[str, Any] = {}
        if app_id is not None:
            params["appId"] = app_id
        if branch is not None:
            params["branch"] = branch
        if tag is not None:
            params["tag"] = tag
        data = await self._get("/builds", params=params)
        all_builds = data.get("builds", [])
        total = len(all_builds)
        start = (page - 1) * limit
        end = start + limit
        page_builds = all_builds[start:end]
        return {
            "pagination": {
                "page": page,
                "limit": limit,
                "total": total,
                "totalPages": (total + limit - 1) // limit if total > 0 else 1,
            },
            "builds": [
                {
                    "id": b.get("_id"),
                    "status": b.get("status"),
                    "branch": b.get("branch"),
                    "tag": b.get("tag"),
                    "workflowId": b.get("workflowId"),
                    "workflowName": b.get("workflowName"),
                    "appId": b.get("appId"),
                    "createdAt": b.get("createdAt"),
                    "startedAt": b.get("startedAt"),
                    "finishedAt": b.get("finishedAt"),
                }
                for b in page_builds
            ],
        }
  • Tools registration: register_all_tools() calls builds.register(mcp), which registers the list_builds MCP tool.
    from mcp.server.fastmcp import FastMCP
    
    from codemagic_mcp.tools import apps, artifacts, builds, caches, variables, webhooks
    
    
    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)
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It transparently describes the listing behavior, optional filters, and pagination parameters with defaults. It does not mention read-only nature or side effects, but for a list operation this is sufficient.

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 well-structured with a main sentence followed by a parameter list. It is front-loaded and each sentence adds value, though the parameter descriptions could be slightly more concise.

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 5 optional parameters and no output schema, the description covers filtering and pagination adequately. It could mention response structure or error cases, but for a list tool it is reasonably complete.

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

Parameters5/5

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

Schema description coverage is 0%, but the description provides detailed explanations for all 5 parameters, including examples for branch and tag. This adds significant value beyond the schema alone.

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 'List Codemagic builds' with optional filters, specifying the verb and resource. It distinguishes from siblings like list_apps or get_build by focusing on builds and mentioning filtering by app, branch, tag.

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

Usage Guidelines3/5

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

The description explains optional filters and pagination but does not provide explicit guidance on when to use this tool versus alternatives like get_build for a single build or list_build_artifacts. Usage context is implied but not stated.

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