get_artifact_url
Retrieve the direct download URL for a specific build artifact using its secure filename.
Instructions
Get the download URL for a build artifact.
Args: secure_filename: The secure filename of the artifact (from build results).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| secure_filename | Yes |
Implementation Reference
- codemagic_mcp/tools/artifacts.py:10-17 (handler)The MCP tool handler that fetches the download URL for a build artifact by secure filename.
async def get_artifact_url(secure_filename: str) -> Any: """Get the download URL for a build artifact. Args: secure_filename: The secure filename of the artifact (from build results). """ async with CodemagicClient() as client: return await client.get_artifact_url(secure_filename) - codemagic_mcp/client.py:413-414 (helper)CodemagicClient method that performs the actual HTTP GET request to /artifacts/{secure_filename} to retrieve the artifact download URL.
async def get_artifact_url(self, secure_filename: str) -> Any: return await self._get(f"/artifacts/{secure_filename}") - codemagic_mcp/tools/__init__.py:6-12 (registration)Registration entry point that calls artifacts.register(mcp) which registers get_artifact_url as an MCP tool.
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) - codemagic_mcp/server.py:43-43 (registration)Main server startup that triggers registration of all tools including get_artifact_url.
register_all_tools(mcp) - codemagic_mcp/client.py:26-29 (helper)Low-level HTTP GET helper used by get_artifact_url to make the API call.
async def _get(self, path: str, **kwargs: Any) -> Any: response = await self._client.get(path, **kwargs) response.raise_for_status() return response.json()