Skip to main content
Glama
badchars

osint-mcp-server

by badchars

dns_wildcard_check

Detect wildcard DNS on a domain by resolving a random subdomain. Identifies wildcard records that can interfere with subdomain enumeration.

Instructions

Check if a domain has wildcard DNS configured by resolving a random subdomain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to check for wildcard DNS

Implementation Reference

  • Core handler for dns_wildcard_check tool. Generates a random 8-byte hex subdomain and resolves it via DNS. If resolution succeeds (returns IPs), wildcard DNS is present; otherwise not.
    export async function dnsWildcardCheck(domain: string): Promise<WildcardCheckResult> {
      const randomSub = crypto.randomBytes(8).toString("hex");
      const testSubdomain = `${randomSub}.${domain}`;
    
      try {
        const ips = await dns.resolve4(testSubdomain);
        return { domain, wildcard: true, testSubdomain, resolvedIps: ips };
      } catch {
        return { domain, wildcard: false, testSubdomain };
      }
    }
  • Type definition (WildcardCheckResult) returned by the handler: domain, wildcard boolean, testSubdomain, and optional resolvedIps.
    interface WildcardCheckResult {
      domain: string;
      wildcard: boolean;
      testSubdomain: string;
      resolvedIps?: string[];
    }
  • Tool registration as a ToolDef with name 'dns_wildcard_check', description, Zod schema (domain as string), and execute wrapper calling dnsWildcardCheck.
    const dnsWildcardCheckTool: ToolDef = {
      name: "dns_wildcard_check",
      description: "Check if a domain has wildcard DNS configured by resolving a random subdomain.",
      schema: {
        domain: z.string().describe("Domain to check for wildcard DNS"),
      },
      execute: async (args) => json(await dnsWildcardCheck(args.domain as string)),
    };
  • Tool is listed in the allTools array registry, making it available to the MCP protocol.
    dnsWildcardCheckTool,
  • Import of crypto (for random bytes) and dns/promises (for resolve4) used by the handler.
    import dns from "node:dns/promises";
    import crypto from "node:crypto";

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior2/5

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

The description mentions the key behavior of resolving a random subdomain but does not explain what constitutes a wildcard detection, error handling (e.g., domain not found), or whether the tool is read-only. Since no annotations exist, more detailed behavioral disclosure is needed.

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?

The description is a single, front-loaded sentence with no redundant words. Every part contributes to understanding the tool's core action.

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?

For a simple tool with one parameter and no output schema, the description is somewhat complete but lacks details about return format (e.g., true/false) and potential false positives or limitations. It is adequate but not comprehensive.

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

Parameters3/5

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

The input schema already describes the 'domain' parameter fully (100% coverage), so the description adds only slight context about the method (random subdomain). The baseline is 3, and the description does not significantly enhance parameter understanding beyond the schema.

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 for wildcard DNS on a domain by resolving a random subdomain. This specific verb-resource pair distinguishes it from sibling tools like dns_lookup or dns_reverse.

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

Usage Guidelines3/5

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

The description implies usage when checking for wildcard DNS but provides no explicit guidance on when to use this tool versus siblings such as dns_lookup. No prerequisites or exclusions are mentioned.

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