delete_webhook
Remove a webhook from a Codemagic application by providing the application ID and webhook ID.
Instructions
Delete a webhook from a Codemagic application.
Args: app_id: The Codemagic application ID. webhook_id: The webhook ID to delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | ||
| webhook_id | Yes |
Implementation Reference
- codemagic_mcp/client.py:470-471 (handler)API client method that sends DELETE request to /apps/{app_id}/webhooks/{webhook_id}. This is the actual HTTP call that deletes the webhook.
async def delete_webhook(self, app_id: str, webhook_id: str) -> Any: return await self._delete(f"/apps/{app_id}/webhooks/{webhook_id}") - codemagic_mcp/tools/webhooks.py:32-41 (handler)MCP tool handler function that is decorated with @mcp.tool(annotations=ToolAnnotations(destructiveHint=True)). It creates a CodemagicClient and calls client.delete_webhook(app_id, webhook_id).
@mcp.tool(annotations=ToolAnnotations(destructiveHint=True)) async def delete_webhook(app_id: str, webhook_id: str) -> Any: """Delete a webhook from a Codemagic application. Args: app_id: The Codemagic application ID. webhook_id: The webhook ID to delete. """ async with CodemagicClient() as client: return await client.delete_webhook(app_id, webhook_id) - codemagic_mcp/tools/__init__.py:6-12 (registration)register_all_tools calls webhooks.register(mcp) which registers all webhook tools including delete_webhook.
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) - Tool docstring and signature define the input schema: app_id (str) and webhook_id (str). The @mcp.tool decorator with destructiveHint=True provides metadata about the tool.
async def delete_webhook(app_id: str, webhook_id: str) -> Any: """Delete a webhook from a Codemagic application. Args: app_id: The Codemagic application ID. webhook_id: The webhook ID to delete. - codemagic_mcp/server.py:36-36 (registration)Server instructions mention delete_webhook as a destructive operation that requires confirmation before execution.
"Destructive ops (delete_app, cancel_build, delete_cache, delete_all_caches, delete_variable, delete_webhook): confirm before executing.\n\n"