Expand description
dns query — direct DNS lookups (dig-style).
Resolves a name via the system resolver by default, or via a
configured [[servers]] entry (--server <ID> + one or more of
--dns/--dot/--doh/--doq or --all), or via an ad-hoc
resolver (--at <ADDR> or dig-style @ADDR positional).
Output is dig-flavoured: a header line starting with @, a blank
line, then a column-aligned table of answers (one block per
transport when fanning out). --short emits answers only;
--json emits a stable JSON shape.
Structs§
- Query
Args - Query
Outcome - Result of
execute_query— everything needed to render output or shape a JSON response for the MCP tool. - Query
Result Block - Per-transport outcome for one block within a single
dns queryinvocation. The renderer turns these into header+rows / short lines / JSON entries.
Enums§
Constants§
- TRANSPORT_
PRECEDENCE - Order in which transports render and run when fanning out. Matches the precedence used to pick a single transport when none is requested (DoH first, DoQ last because it’s an opt-in build).
Functions§
- execute_
query - Programmatic entry point — runs a query and returns the per-
transport results without printing anything. Shared between the
CLI runner and the MCP
dns_resolvetool so behaviour stays in parity by construction. - run_
query - Entry point for the
dns querysubcommand.