delete_dns_record
Delete a specific DNS record from a Cloudflare zone by providing the zone and record ID.
Instructions
Delete a DNS record from a zone
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| record_id | Yes | The DNS record ID to delete |
Implementation Reference
- Handler function that executes the delete DNS record logic. Sends 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", ) - Schema definition for the delete_dns_record tool. Requires zone_id and record_id as required string parameters.
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)Registration of the delete_dns_record tool in the call_tool handler. Routes incoming tool call requests to the _delete_dns_record handler method.
elif name == "delete_dns_record": result = await self._delete_dns_record(arguments)