Skip to main content
Glama
ry-ops

Cloudflare MCP Server

by ry-ops

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
NameRequiredDescriptionDefault
zone_idYesThe zone ID
record_idYesThe 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"],
        },
    ),
  • 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ry-ops/cloudflare-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server