Skip to main content
Glama
Fewsats
by Fewsats

dns_records

Retrieve DNS records for a domain to manage configurations like A, CNAME, MX, and TXT entries, including values and TTL settings.

Instructions

Get DNS records for a domain. domain_id: Domain UUID (e.g: 'd1234567-89ab-cdef-0123-456789abcdef') Each DNS record contains: id (str): Unique record identifier type (str): DNS record type (e.g. 'A', 'CNAME', 'MX', 'TXT') name (str): DNS record name value (str): DNS record value ttl (int): Time to live in seconds

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domain_idYes

Implementation Reference

  • The MCP tool handler for 'dns_records', decorated with @mcp.tool() for registration. It takes a domain_id and delegates to the Sherlock instance's _dns_records method, handling the response.
    @mcp.tool() async def dns_records(domain_id: str): """ Get DNS records for a domain. domain_id: Domain UUID (e.g: 'd1234567-89ab-cdef-0123-456789abcdef') Each DNS record contains: id (str): Unique record identifier type (str): DNS record type (e.g. 'A', 'CNAME', 'MX', 'TXT') name (str): DNS record name value (str): DNS record value ttl (int): Time to live in seconds """ return handle_response(get_sherlock()._dns_records(domain_id))
  • The @mcp.tool() decorator registers the dns_records function as an MCP tool.
    @mcp.tool()
  • Helper function to handle responses from Sherlock methods, used by dns_records and other tools.
    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 get or create the Sherlock instance, used by dns_records and other tools.
    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