Skip to main content
Glama

Local Dig

local_dig

Run 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

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDomain name to query (underscore labels such as _dmarc.example.com are allowed)
shortNoShort output (just the answer, no headers)
serverNoDNS server to query (e.g. '8.8.8.8'). None uses system default.
record_typeNoDNS record type mnemonic: A, AAAA, MX, NS, TXT, SOA, ... or TYPE<n>A

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoAdditional context about the result
errorNoWhy 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.
stderrYesStandard error of the command, or the failure message when the command did not run
stdoutYesStandard output of the command (curl output is capped at 10,000 characters)
commandYesThe exact command line that was executed, or the tool name if the command never ran
successYesTrue when the command ran and exited with status 0
platformYesOperating system the command ran on (Darwin, Linux or Windows)
returncodeYesProcess exit status. 0 = success; 2 = input rejected before running; 124 = timed out; 126 = disabled by config or permission denied; 127 = binary not found

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden and does so well. It discloses that the tool runs the actual dig binary, returns raw output including query time and server, falls back to nslookup when dig is unavailable, does not require admin privileges, and rejects dig options such as '+trace' or '-x' with errors reported in the result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, then efficiently covers the sibling distinction, use case, fallback behavior, privilege requirement, and a parameter constraint. Every sentence adds useful information and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, return values need not be elaborated. The description covers the tool's execution model, expected output characteristics, fallback behavior, privilege needs, and failure handling for invalid parameter values. An agent has enough context to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaningful parameter semantics beyond the schema by specifying that record_type must be a bare mnemonic of 1-10 letters/digits and that dig options are rejected and surfaced in the error field, which is not present in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Run dig on the local machine for DNS lookups.' It clearly distinguishes itself from the sibling dns_lookup by noting it executes the actual dig binary and returns raw output, making its purpose and differentiation immediately clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description names the relevant alternative (dns_lookup) and explains the difference in implementation and output, and it states when it is useful: 'seeing exactly what a real resolver returns.' It does not explicitly state when not to use it, but the contrast with dns_lookup provides strong contextual guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.