create_artifact_public_url
Generate a time-limited public URL for a build artifact to share access temporarily.
Instructions
Create a time-limited public URL for a build artifact.
Args: secure_filename: The secure filename of the artifact (from build results). expires_at: Expiry time as a UNIX timestamp (seconds since epoch).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| secure_filename | Yes | ||
| expires_at | Yes |
Implementation Reference
- codemagic_mcp/tools/artifacts.py:19-30 (handler)Tool handler function that creates a time-limited public URL for a build artifact. Decorated with @mcp.tool(), delegates to CodemagicClient.
@mcp.tool() async def create_artifact_public_url( secure_filename: str, expires_at: int ) -> Any: """Create a time-limited public URL for a build artifact. Args: secure_filename: The secure filename of the artifact (from build results). expires_at: Expiry time as a UNIX timestamp (seconds since epoch). """ async with CodemagicClient() as client: return await client.create_artifact_public_url(secure_filename, expires_at) - codemagic_mcp/client.py:416-422 (helper)Client helper method that makes the actual HTTP POST request to /artifacts/{secure_filename}/public-url with the expiresAt payload.
async def create_artifact_public_url( self, secure_filename: str, expires_at: int ) -> Any: return await self._post( f"/artifacts/{secure_filename}/public-url", json={"expiresAt": expires_at}, ) - Input schema: takes secure_filename (str) and expires_at (int, UNIX timestamp).
async def create_artifact_public_url( secure_filename: str, expires_at: int ) -> Any: - codemagic_mcp/tools/__init__.py:6-12 (registration)Registration orchestrator: artifacts.register(mcp) is called here, which registers the create_artifact_public_url tool via the @mcp.tool() decorator.
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)