get_dns_lookup
Check what a hostname resolves to from a remote Linux host over SSH; optionally run direct dig queries to inspect DNS status, records, and the answering server.
Instructions
Resolves a hostname (or reverse-resolves an IP address) ON a remote Linux host via SSH, and prints its /etc/resolv.conf. USE THIS TOOL to check what a name resolves to from that host. By default uses getent, which resolves exactly like applications on the host do (/etc/hosts, nsswitch.conf, then DNS). A name that does not resolve gives exit code 2. use_dig=True queries the DNS servers directly with dig (bypassing /etc/hosts) and returns the full answer: status (NOERROR, NXDOMAIN, SERVFAIL), CNAME chain, TTLs, the server that answered and query time. It fails with exit code 127 if dig is not installed - then use use_dig=False. The next two parameters require use_dig=True: record_type is one of A (default), AAAA, CNAME, MX, NS, TXT, SOA, PTR, SRV, CAA. server (IP address or hostname, e.g. '8.8.8.8') asks that DNS server instead of the ones in /etc/resolv.conf - compare both answers to tell a broken resolver from a broken record.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"host": "<host>",
"user": "<user>"
},
"name": "get_dns_lookup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| name | Yes | ||
| port | No | ||
| user | Yes | ||
| server | No | ||
| timeout | No | ||
| use_dig | No | ||
| key_path | No | ||
| password | No | ||
| record_type | No | A | |
| accept_new_hostkey | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||