Skip to main content
Glama

get_build_logs

Retrieve a step-by-step status summary of a Codemagic build, including each step's name, ID, and status (success, failed, skipped, canceled). Optionally filter results by status.

Instructions

Get a step-by-step status summary of a Codemagic build.

Returns each build step with its name, ID, and status (✅ success, ❌ failed, ⏭ skipped).

Args: build_id: The Codemagic build ID. statuses: Optional list of statuses to filter by. Valid values: "success", "failed", "skipped", "canceled". If omitted, all steps are returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
build_idYes
statusesNo

Implementation Reference

  • The MCP tool handler for 'get_build_logs'. Defines the tool with @mcp.tool(), takes build_id and optional statuses filter, delegates to CodemagicClient.get_build_logs.
    @mcp.tool()
    async def get_build_logs(
        build_id: str,
        statuses: list[str] | None = None,
    ) -> Any:
        """Get a step-by-step status summary of a Codemagic build.
    
        Returns each build step with its name, ID, and status (✅ success, ❌ failed, ⏭ skipped).
    
        Args:
            build_id: The Codemagic build ID.
            statuses: Optional list of statuses to filter by. Valid values: "success", "failed", "skipped", "canceled".
                      If omitted, all steps are returned.
        """
        async with CodemagicClient() as client:
            return await client.get_build_logs(build_id, statuses=statuses)
  • The actual implementation logic in CodemagicClient. Fetches build data from /builds/{build_id}, extracts buildActions, formats each step with emoji, name, ID, and status.
    async def get_build_logs(self, build_id: str, statuses: list[str] | None = None) -> str:
        build_data = await self._get(f"/builds/{build_id}")
        actions = build_data.get("build", {}).get("buildActions", [])
        status_emoji = {
            "success": "✅",
            "failed": "❌",
            "skipped": "⏭",
            "canceled": "🚫",
        }
        lines = []
        for action in actions:
            status = action.get("status") or "unknown"
            if statuses and status not in statuses:
                continue
            emoji = status_emoji.get(status, "⏳")
            lines.append(f"{emoji}  {action.get('name')}")
            lines.append(f"    ID: {action.get('_id')}  status: {status}")
        return "\n".join(lines)
  • Registration entry point. register_all_tools calls builds.register(mcp), which triggers the @mcp.tool() decorator on get_build_logs.
    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)
  • The register function in builds.py where @mcp.tool() decorators (including get_build_logs) are applied.
    def register(mcp: FastMCP) -> None:
Behavior3/5

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

Describes output format (each step with name, ID, status emoji) and optional filtering, but does not disclose idempotency, authentication needs, or error handling. No annotations present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise and well-structured: purpose sentence, output description, then parameter listings. No unnecessary words.

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?

Provides adequate context for a simple retrieval tool: purpose, output, and parameter details. Minor gap in not addressing error scenarios or output schema, but not critical given simplicity.

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

Parameters4/5

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

Build_id description is minimal but sufficient; statuses description adds valid enum values and default behavior, compensating for 0% schema description coverage.

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?

Clearly states the tool retrieves a step-by-step status summary of a Codemagic build, distinguishing it from sibling tools like get_build (full build info) and get_step_logs (raw logs).

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives; does not mention when not to use or provide exclusion criteria.

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