Skip to main content
Glama

get_step_logs

Retrieve detailed logs for a specific build step in Codemagic CI/CD pipelines to debug and analyze step execution.

Instructions

Get the raw logs for a specific build step.

Use get_build_logs first to see all step IDs, then call this to drill into a specific step.

Args: build_id: The Codemagic build ID. step_id: The step ID (from get_build_logs output).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
build_idYes
step_idYes

Implementation Reference

  • The MCP tool handler for 'get_step_logs'. It accepts build_id and step_id and delegates to the CodemagicClient.
    @mcp.tool()
    async def get_step_logs(build_id: str, step_id: str) -> Any:
        """Get the raw logs for a specific build step.
    
        Use get_build_logs first to see all step IDs, then call this to drill into a specific step.
    
        Args:
            build_id: The Codemagic build ID.
            step_id: The step ID (from get_build_logs output).
        """
        async with CodemagicClient() as client:
            return await client.get_step_logs(build_id, step_id)
  • The actual implementation of the log retrieval logic in the CodemagicClient, which performs the HTTP request to the API.
    async def get_step_logs(self, build_id: str, step_id: str) -> str:
        response = await self._client.get(f"/builds/{build_id}/step/{step_id}")
        response.raise_for_status()
        return response.text

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