Skip to main content
Glama

list_builds

Retrieve and filter Codemagic CI/CD builds by app, branch, or tag to monitor build history and status.

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

  • Implementation of the list_builds method in the CodemagicClient class, which handles the actual API request to retrieve builds.
    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
            ],
        }
  • Registration of the list_builds tool within the MCP server.
    def register(mcp: FastMCP) -> None:
        @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
                )
Behavior3/5

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

With no annotations provided, description carries full burden. It successfully discloses pagination behavior (page starting from 1, default limits) and cross-app listing scope, but omits safety characteristics (read-only), rate limits, or return structure that would be essential without annotations.

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?

Well-structured with purpose front-loaded in first sentence followed by organized Args documentation. Slightly verbose parameter descriptions, but necessary given schema deficiencies. No fluff or tautology.

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?

Adequate for tool invocation given the 5 parameters and pagination complexity, but lacks return value documentation (no output schema exists to cover this gap). Missing guidance on result ordering (chronological?) and maximum pagination limits.

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?

Excellent compensation for 0% schema description coverage. The Args section documents all 5 parameters with concrete examples ('main', 'release_v5.57.2'), default values, and clarifies optional vs. required nature—adding significant value beyond the bare schema titles.

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?

Description opens with specific verb 'List' + resource 'Codemagic builds' and clarifies filtering capabilities (app, branch, tag). Effectively distinguishes from sibling 'get_build' (singular retrieval) by emphasizing plural listing and optional filtering.

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?

Provides implicit guidance by describing behavior when app_id is omitted ('returns builds across all apps'), but lacks explicit comparison to 'get_build' for single-build retrieval or when to prefer filtering vs. specific ID lookup.

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