Skip to main content
Glama
badchars

osint-mcp-server

by badchars

dns_srv_discover

Discover SRV records and service CNAMEs for a domain to identify SIP, XMPP, Autodiscover, LDAP, and other enterprise services.

Instructions

Discover SRV records and common service CNAMEs for a domain. Probes for SIP, XMPP, Autodiscover, LDAP, Kerberos, CalDAV, CardDAV, and checks CNAMEs for autodiscover, lyncdiscover, OWA, ADFS, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to probe

Implementation Reference

  • Core implementation of the dns_srv_discover tool. Probes for SRV records (SIP, XMPP, Autodiscover, LDAP, Kerberos, CalDAV, CardDAV, etc.) and CNAME records (autodiscover, lyncdiscover, OWA, ADFS, etc.) for a given domain.
    export async function dnsSrvDiscover(domain: string): Promise<SrvDiscoverResult> {
      const srvRecords: SrvRecord[] = [];
      const cnameRecords: CnameRecord[] = [];
    
      // SRV probes
      const srvPromises = SRV_PROBES.map(async (prefix) => {
        const fqdn = `${prefix}.${domain}`;
        try {
          const srvs = await dns.resolveSrv(fqdn);
          for (const s of srvs) {
            srvRecords.push({ name: fqdn, target: s.name, port: s.port, priority: s.priority, weight: s.weight });
          }
        } catch {
          // Not found
        }
      });
    
      // CNAME probes
      const cnamePromises = CNAME_PROBES.map(async (prefix) => {
        const fqdn = `${prefix}.${domain}`;
        try {
          const cnames = await dns.resolveCname(fqdn);
          for (const c of cnames) {
            cnameRecords.push({ name: fqdn, target: c });
          }
        } catch {
          // Not found — try A record to see if it exists
          try {
            const ips = await dns.resolve4(fqdn);
            if (ips.length > 0) {
              cnameRecords.push({ name: fqdn, target: ips.join(", ") });
            }
          } catch {
            // Not found
          }
        }
      });
    
      await Promise.all([...srvPromises, ...cnamePromises]);
    
      return { domain, srvRecords, cnameRecords };
    }
  • Type definitions for the SRV discovery: SrvRecord, CnameRecord, and SrvDiscoverResult interfaces defining the return shape.
    interface SrvRecord {
      name: string;
      target: string;
      port: number;
      priority: number;
      weight: number;
    }
    
    interface CnameRecord {
      name: string;
      target: string;
    }
    
    interface SrvDiscoverResult {
      domain: string;
      srvRecords: SrvRecord[];
      cnameRecords: CnameRecord[];
    }
  • SRV_PROBES and CNAME_PROBES constant arrays defining the service prefixes to probe.
    const SRV_PROBES = [
      "_sip._tls",
      "_sipfederationtls._tcp",
      "_autodiscover._tcp",
      "_xmpp-server._tcp",
      "_xmpp-client._tcp",
      "_imaps._tcp",
      "_submission._tcp",
      "_ldap._tcp",
      "_kerberos._tcp",
      "_kerberos._udp",
      "_caldavs._tcp",
      "_carddavs._tcp",
    ];
  • ToolDef registration for the 'dns_srv_discover' tool, defining name, description, Zod schema (domain string), and execute handler that calls dnsSrvDiscover from the dns module.
    const dnsSrvDiscoverTool: ToolDef = {
      name: "dns_srv_discover",
      description: "Discover SRV records and common service CNAMEs for a domain. Probes for SIP, XMPP, Autodiscover, LDAP, Kerberos, CalDAV, CardDAV, and checks CNAMEs for autodiscover, lyncdiscover, OWA, ADFS, etc.",
      schema: {
        domain: z.string().describe("Domain to probe"),
      },
      execute: async (args) => json(await dnsSrvDiscover(args.domain as string)),
    };
  • Registration of dnsSrvDiscoverTool in the allTools array.
    dnsSrvDiscoverTool,
    dnsWildcardCheckTool,
Behavior3/5

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

No annotations provided, so description carries full burden. It lists what is probed but does not disclose if it is read-only, any rate limits, or other limitations. Basic behavioral description but lacks depth.

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?

Two sentences, well-structured with no unnecessary information. Every sentence adds value.

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

Completeness5/5

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

Tool has one parameter and no output schema. Description is sufficient given the complexity, listing the probed services, and providing clear context for use.

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 has one parameter 'domain' with a simple description 'Domain to probe'. The description adds value by elaborating on the probe details (SRV and CNAME checks for various services), compensating beyond 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?

Description clearly states the tool discovers SRV records and common service CNAMEs for a domain, listing specific services (SIP, XMPP, etc.). This is a specific verb+resource and distinguishes from sibling DNS tools like dns_lookup.

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?

Description implies usage for probing service endpoints, but does not explicitly state when not to use it or suggest alternatives. Sibling tools exist but no guidance provided.

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