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
| Name | Required | Description | Default |
|---|---|---|---|
| build_id | Yes | ||
| step_id | Yes |
Implementation Reference
- codemagic_mcp/tools/builds.py:103-114 (handler)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) - codemagic_mcp/client.py:249-252 (handler)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