Local Dig
local_digRun local DNS lookups with dig, returning raw resolver output including query time and server. Falls back to nslookup when dig is unavailable.
Instructions
Run dig on the local machine for DNS lookups.
Unlike dns_lookup (which uses dnspython), this runs the actual dig binary and returns raw output including query time, server used, and all sections. Useful for seeing exactly what a real resolver returns. Falls back to nslookup when dig is not installed. Does not require admin privileges.
record_type must be a bare mnemonic (1-10 letters/digits); dig options such as '+trace' or '-x' are rejected and reported in the result's error field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Domain name to query (underscore labels such as _dmarc.example.com are allowed) | |
| short | No | Short output (just the answer, no headers) | |
| server | No | DNS server to query (e.g. '8.8.8.8'). None uses system default. | |
| record_type | No | DNS record type mnemonic: A, AAAA, MX, NS, TXT, SOA, ... or TYPE<n> | A |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Additional context about the result | |
| error | No | Why the tool could not produce a result: input validation failure, tool disabled by configuration, binary not installed, or no service answered. Empty when the command executed. | |
| stderr | Yes | Standard error of the command, or the failure message when the command did not run | |
| stdout | Yes | Standard output of the command (curl output is capped at 10,000 characters) | |
| command | Yes | The exact command line that was executed, or the tool name if the command never ran | |
| success | Yes | True when the command ran and exited with status 0 | |
| platform | Yes | Operating system the command ran on (Darwin, Linux or Windows) | |
| returncode | Yes | Process exit status. 0 = success; 2 = input rejected before running; 124 = timed out; 126 = disabled by config or permission denied; 127 = binary not found |