Skip to main content
Glama
Fewsats
by Fewsats

delete_dns

Remove DNS records from domains managed through Sherlock Domains MCP by specifying domain and record IDs.

Instructions

Delete a DNS record for a domain. domain_id: Domain UUID (e.g., 'd1234567-89ab-cdef-0123-456789abcdef') record_id: DNS record ID to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domain_idYes
record_idYes

Implementation Reference

  • The main handler function for the 'delete_dns' MCP tool. It is decorated with @mcp.tool() for registration and executes the deletion by delegating to the Sherlock library's _delete_dns_record method, wrapped in handle_response.
    @mcp.tool() async def delete_dns(domain_id: str, record_id: str): """ Delete a DNS record for a domain. domain_id: Domain UUID (e.g., 'd1234567-89ab-cdef-0123-456789abcdef') record_id: DNS record ID to delete """ return handle_response(get_sherlock()._delete_dns_record(domain_id, record_id))
  • Helper function used by delete_dns (and other tools) to standardize responses from Sherlock methods, handling both raw HTTP responses and pre-processed data.
    def handle_response(response): """ Handle responses from Sherlock methods. Sherlock methods already process the response using _handle_response, which returns either a processed JSON object for successful requests or the response object itself. """ if hasattr(response, 'status_code'): # This is a raw response object try: return response.status_code, response.json() except: return response.status_code, response.text # This is already processed data (like a dictionary) return response
  • Helper function to lazily instantiate the Sherlock client, used by delete_dns via get_sherlock().
    def get_sherlock(): """Get or create a Sherlock instance. We want to create the class instance inside the tool, so the init errors will bubble up to the tool and hence the MCP client instead of silently failing during the server creation. """ return Sherlock()

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/Fewsats/sherlock-mcp'

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