Skip to main content
Glama
Fewsats

Sherlock Domains MCP

by Fewsats

update_dns

Modify DNS records for domains by changing record type, name, value, or TTL to update website routing, email configuration, or security settings.

Instructions

Update an existing DNS record for a domain.

NOTE: Updating a record will change its record id.
domain_id: Domain UUID (e.g., 'd1234567-89ab-cdef-0123-456789abcdef')
record_id: DNS record UUID to update
type: DNS record type ('A', 'AAAA', 'CNAME', 'MX', 'TXT', etc.)
name: Subdomain or record name (e.g., 'www' for www.yourdomain.com)
value: New record value (e.g., IP address for A records)
ttl: Time To Live in seconds (default: 3600)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domain_idYes
record_idYes
typeNoTXT
nameNotest-2
valueNotest-2
ttlNo

Implementation Reference

  • The handler function for the 'update_dns' MCP tool. It is decorated with @mcp.tool() for registration and executes the tool logic by calling the underlying Sherlock client's _update_dns_record method, then wraps the response using handle_response.
    @mcp.tool()
    async def update_dns(domain_id: str, record_id: str, type: str = "TXT", name: str = "test-2", value: str = "test-2", ttl: int = 3600):
        """
        Update an existing DNS record for a domain.
    
        NOTE: Updating a record will change its record id.
        domain_id: Domain UUID (e.g., 'd1234567-89ab-cdef-0123-456789abcdef')
        record_id: DNS record UUID to update
        type: DNS record type ('A', 'AAAA', 'CNAME', 'MX', 'TXT', etc.)
        name: Subdomain or record name (e.g., 'www' for www.yourdomain.com)
        value: New record value (e.g., IP address for A records)
        ttl: Time To Live in seconds (default: 3600)
        """
        return handle_response(get_sherlock()._update_dns_record(domain_id, record_id, type, name, value, ttl))
  • The @mcp.tool() decorator registers the update_dns function as an MCP tool.
    @mcp.tool()
  • Input schema defined by function parameters with type hints and detailed docstring describing parameters and usage.
    async def update_dns(domain_id: str, record_id: str, type: str = "TXT", name: str = "test-2", value: str = "test-2", ttl: int = 3600):
        """
        Update an existing DNS record for a domain.
    
        NOTE: Updating a record will change its record id.
        domain_id: Domain UUID (e.g., 'd1234567-89ab-cdef-0123-456789abcdef')
        record_id: DNS record UUID to update
        type: DNS record type ('A', 'AAAA', 'CNAME', 'MX', 'TXT', etc.)
        name: Subdomain or record name (e.g., 'www' for www.yourdomain.com)
        value: New record value (e.g., IP address for A records)
        ttl: Time To Live in seconds (default: 3600)
        """
        return handle_response(get_sherlock()._update_dns_record(domain_id, record_id, type, name, value, ttl))
  • Helper function used by update_dns (and other tools) to standardize Sherlock API responses into MCP-compatible format.
    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

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