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";
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that a random subdomain is resolved, indicating a DNS query, but does not state that it is a read-only operation or any potential side effects. Adequate for a simple check but minimal.

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?

A single, concise sentence that front-loads the purpose. No extraneous information; every word earns its place.

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?

The description does not explain the return value or format, which is important since there is no output schema. For a simple tool, this is a gap that could be filled with additional context.

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?

The input schema has 100% coverage with a description for the domain parameter, and the tool description adds context about the mechanism (resolving a random subdomain), which enhances 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 it checks for wildcard DNS by resolving a random subdomain, specifying the verb and resource. This distinguishes it from sibling tools like dns_lookup which perform general DNS lookups.

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?

No explicit guidance on when to use this tool versus alternatives or when not to use it. The description implies usage for wildcard detection but lacks context on prerequisites or exclusions.

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/badchars/osint-mcp-server'

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