delete_dns_record
Remove DNS records from Cloudflare zones to manage domain configurations, update routing, or clean up obsolete entries using zone and record identifiers.
Instructions
Delete a DNS record from a zone
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| record_id | Yes | The DNS record ID to delete |
Implementation Reference
- The handler function that executes the deletion by sending a DELETE request to the Cloudflare API endpoint /zones/{zone_id}/dns_records/{record_id}.async def _delete_dns_record(self, args: dict) -> Any: """Delete DNS record.""" return await self._make_request( f"/zones/{args['zone_id']}/dns_records/{args['record_id']}", method="DELETE", )
- The input schema for the delete_dns_record tool, defining required parameters zone_id and record_id.Tool( name="delete_dns_record", description="Delete a DNS record from a zone", inputSchema={ "type": "object", "properties": { "zone_id": {"type": "string", "description": "The zone ID"}, "record_id": { "type": "string", "description": "The DNS record ID to delete", }, }, "required": ["zone_id", "record_id"], }, ),
- src/cloudflare_mcp_server/__init__.py:416-417 (registration)The dispatch logic in the call_tool method that routes calls to the _delete_dns_record handler.elif name == "delete_dns_record": result = await self._delete_dns_record(arguments)