Skip to main content
Glama

recon.dns

Resolve DNS records for domains to identify infrastructure details during security reconnaissance and vulnerability testing.

Instructions

Resolve DNS records for a domain or subdomain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to resolve
recordTypeNoDNS record type (A, AAAA, CNAME, MX, TXT)A

Implementation Reference

  • The handler function for the 'recon.dns' tool. It verifies the 'dig' command is available, executes 'dig +short <domain> <recordType>' to resolve DNS records, parses the stdout into a list of records, and returns a formatted ToolResult with success status, records, and raw output.
    async ({ domain, recordType = 'A' }: any): Promise<ToolResult> => { try { const exists = await checkCommandExists('dig'); if (!exists) { return formatToolResult(false, null, 'dig command not found'); } const result = await runCommand('dig', ['+short', domain, recordType]); const records = result.stdout .split('\n') .filter((s) => s.trim().length > 0); return formatToolResult(true, { domain, recordType, records, raw: result.stdout, }); } catch (error: any) { return formatToolResult(false, null, error.message); } }
  • Input schema definition for the 'recon.dns' tool, specifying required 'domain' parameter and optional 'recordType' with default 'A'.
    type: 'object', properties: { domain: { type: 'string', description: 'Domain to resolve' }, recordType: { type: 'string', description: 'DNS record type (A, AAAA, CNAME, MX, TXT)', default: 'A', }, }, required: ['domain'], },
  • Specific registration of the 'recon.dns' tool on the MCP server, including name, description, input schema, and inline handler function.
    'recon.dns', { description: 'Resolve DNS records for a domain or subdomain', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'Domain to resolve' }, recordType: { type: 'string', description: 'DNS record type (A, AAAA, CNAME, MX, TXT)', default: 'A', }, }, required: ['domain'], }, }, async ({ domain, recordType = 'A' }: any): Promise<ToolResult> => { try { const exists = await checkCommandExists('dig'); if (!exists) { return formatToolResult(false, null, 'dig command not found'); } const result = await runCommand('dig', ['+short', domain, recordType]); const records = result.stdout .split('\n') .filter((s) => s.trim().length > 0); return formatToolResult(true, { domain, recordType, records, raw: result.stdout, }); } catch (error: any) { return formatToolResult(false, null, error.message); } } );
  • src/index.ts:35-35 (registration)
    Top-level registration call that invokes registerReconTools(server), which registers the 'recon.dns' tool along with other reconnaissance tools.
    registerReconTools(server);

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/telmon95/VulneraMCP'

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