Skip to main content
Glama
seayniclabs

Keel

by seayniclabs

dns_propagation

Query multiple public DNS resolvers to check propagation and detect inconsistencies in A, AAAA, CNAME, MX, TXT records.

Instructions

Check DNS propagation across multiple public resolvers.

Queries Google (8.8.8.8), Cloudflare (1.1.1.1), OpenDNS (208.67.222.222), Quad9 (9.9.9.9), and the system default resolver in parallel, then highlights any inconsistencies between them.

Supported record types: A, AAAA, CNAME, MX, TXT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes
record_typeNoA

Implementation Reference

  • The dns_propagation tool handler. Queries multiple public DNS resolvers (Google, Cloudflare, OpenDNS, Quad9) plus system default in parallel, then checks consistency across results. Validates domain via sanitize_domain() and record_type against allowed set {A, AAAA, CNAME, MX, TXT}. Returns domain, record_type, consistent flag, and per-resolver results.
    @mcp.tool()
    async def dns_propagation(
        domain: str,
        record_type: str = "A",
    ) -> dict:
        """Check DNS propagation across multiple public resolvers.
    
        Queries Google (8.8.8.8), Cloudflare (1.1.1.1), OpenDNS (208.67.222.222),
        Quad9 (9.9.9.9), and the system default resolver in parallel, then
        highlights any inconsistencies between them.
    
        Supported record types: A, AAAA, CNAME, MX, TXT.
        """
        domain = sanitize_domain(domain)
        record_type = record_type.upper()
        allowed_types = {"A", "AAAA", "CNAME", "MX", "TXT"}
        if record_type not in allowed_types:
            raise ValueError(f"record_type must be one of {allowed_types}")
    
        async def _query(name: str, nameserver: str | None) -> dict:
            """Query a single resolver and return its results."""
            resolver = dns.resolver.Resolver()
            if nameserver:
                resolver.nameservers = [nameserver]
            resolver.lifetime = 10  # seconds
    
            try:
                answers = await asyncio.get_event_loop().run_in_executor(
                    None, lambda: resolver.resolve(domain, record_type)
                )
                records = sorted(str(r) for r in answers)
                ttl = answers.rrset.ttl if answers.rrset else None
                return {"resolver": name, "nameserver": nameserver or "system", "records": records, "ttl": ttl}
            except dns.resolver.NXDOMAIN:
                return {"resolver": name, "nameserver": nameserver or "system", "records": [], "error": "NXDOMAIN"}
            except dns.resolver.NoAnswer:
                return {"resolver": name, "nameserver": nameserver or "system", "records": [], "error": "No answer"}
            except dns.resolver.NoNameservers:
                return {"resolver": name, "nameserver": nameserver or "system", "records": [], "error": "No nameservers"}
            except Exception as exc:
                return {"resolver": name, "nameserver": nameserver or "system", "records": [], "error": str(exc)}
    
        # Build tasks: named resolvers + system default
        tasks = [_query(name, ns) for name, ns in _PUBLIC_RESOLVERS.items()]
        tasks.append(_query("System Default", None))
    
        results = await asyncio.gather(*tasks)
    
        # Detect inconsistencies — compare record sets across resolvers
        record_sets: dict[str, set[str]] = {}
        for r in results:
            if "error" not in r:
                record_sets[r["resolver"]] = set(r["records"])
    
        consistent = True
        if len(record_sets) > 1:
            reference = next(iter(record_sets.values()))
            for rs in record_sets.values():
                if rs != reference:
                    consistent = False
                    break
    
        return {
            "domain": domain,
            "record_type": record_type,
            "consistent": consistent,
            "resolvers": results,
        }
  • The @mcp.tool() decorator registering dns_propagation as an MCP tool on the FastMCP 'sounding' server instance (defined on line 33).
    @mcp.tool()
  • Public DNS resolver definitions and allowed record types used as input constraints for the dns_propagation tool.
    # Public DNS resolvers for propagation checks.
    _PUBLIC_RESOLVERS = {
        "Google": "8.8.8.8",
        "Cloudflare": "1.1.1.1",
        "OpenDNS": "208.67.222.222",
        "Quad9": "9.9.9.9",
    }
  • The sanitize_domain helper used by dns_propagation to clean and validate the domain input, stripping whitespace, lowercasing, and checking against shell metacharacters and hostname patterns.
    def sanitize_domain(domain: str) -> str:
        """Sanitize a domain name for DNS lookups.
    
        Strips whitespace, lowercases, and rejects shell metacharacters.
        Returns the cleaned domain.
        """
        domain = domain.strip().lower()
        if not domain:
            raise ValueError("Domain must not be empty")
    
        if _SHELL_META.search(domain):
            raise ValueError(f"Domain contains forbidden characters: {domain!r}")
    
        if not _HOSTNAME_RE.match(domain):
            raise ValueError(f"Invalid domain: {domain!r}")
    
        return domain
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the burden. It discloses parallel queries to resolvers and inconsistency highlighting. It could mention rate limits or error behavior, but current detail is fairly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four concise sentences with a clear list of resolvers and record types. No fluff; front-loaded with purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, and description doesn't detail return values. It mentions highlighting inconsistencies but lacks specifics on response format. Adequate for basic use but leaves agents guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description adds significant value: it explains 'domain' as the domain to query and 'record_type' defaults to A with supported types listed. It could clarify format or case sensitivity, but overall good.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks DNS propagation across multiple public resolvers (Google, Cloudflare, etc.) and highlights inconsistencies. It lists supported record types, distinguishing it from sibling tools like dns_lookup and reverse_dns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (for propagation checking) but does not explicitly state when not to use it or mention alternatives. Given sibling tools, the context is clear, but explicit exclusions would improve it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/seayniclabs/sounding'

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