web_dns_lookup
Retrieve DNS records for a domain to analyze configuration, troubleshoot connectivity, or verify domain settings using the claw-mcp-toolkit web utilities module.
Instructions
Look up DNS records for a domain
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name (e.g. google.com) |
Implementation Reference
- src/modules/web.ts:35-41 (handler)The implementation of the 'web_dns_lookup' tool, which uses the Google DNS API to resolve a domain name.
server.tool("web_dns_lookup", "Look up DNS records for a domain", { domain: z.string().describe("Domain name (e.g. google.com)") }, async ({ domain }) => { const data = await safeFetch(`https://dns.google/resolve?name=${domain}&type=A`); const records = data.Answer?.map((r: any) => `${r.type === 1 ? "A" : r.type === 5 ? "CNAME" : r.type}: ${r.data}`).join("\n") || "No records found"; return { content: [{ type: "text", text: `**DNS Lookup:** ${domain}\nStatus: ${data.Status === 0 ? "OK" : "ERROR"}\n\n${records}` }] }; });