delete_cache
Remove a specific build cache for a Codemagic application to free storage space and resolve cache-related issues by providing the app ID and cache ID.
Instructions
Delete a specific build cache for a Codemagic application.
Args: app_id: The Codemagic application ID. cache_id: The cache ID to delete.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | ||
| cache_id | Yes |
Implementation Reference
- codemagic_mcp/tools/caches.py:30-39 (handler)The MCP tool registration and handler for `delete_cache`. It calls the `CodemagicClient.delete_cache` method.
@mcp.tool(annotations=ToolAnnotations(destructiveHint=True)) async def delete_cache(app_id: str, cache_id: str) -> Any: """Delete a specific build cache for a Codemagic application. Args: app_id: The Codemagic application ID. cache_id: The cache ID to delete. """ async with CodemagicClient() as client: return await client.delete_cache(app_id, cache_id) - codemagic_mcp/client.py:340-341 (handler)The underlying API client method that performs the actual HTTP DELETE request to the Codemagic API to delete a cache.
async def delete_cache(self, app_id: str, cache_id: str) -> Any: return await self._delete(f"/apps/{app_id}/caches/{cache_id}")