Skip to main content
Glama

network/nslookup

Read-onlyIdempotent

Resolve DNS records for a hostname via the host's resolver. Returns JSON with A, AAAA, CNAME, TXT, MX, NS, or ANY record types.

Instructions

Resolves DNS records for a hostname through the host's resolver (/etc/resolv.conf; a DNS server cannot be chosen), so answers may come from a local cache. Read-only, but it sends queries off-host. record_type (case-insensitive) is A, AAAA, CNAME, TXT, MX, NS or ANY; the default ANY is not a DNS ANY query but runs the CNAME, A/AAAA, TXT, MX and NS lookups in turn. Other types (SOA, PTR, SRV) are rejected, and host must be a name: an IP address is not reverse-resolved. Always returns JSON: an object with host and records (array of objects with type and value; an MX value looks like 10 mail.example.com.). Empty records means the name exists but has no record of that type; a name that does not exist is an error (HOST: no such host). To test reachability use network/ping, to fetch a URL network/curl.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesHostname to resolve, e.g. example.com (an IP address is not reverse-resolved)
record_typeNoA, AAAA, CNAME, TXT, MX, NS or ANY (default ANY: all of these are looked up in turn)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.1
    • addedInput schema / properties / host / description
      Added value: +"Hostname to resolve, e.g. example.com (an IP address is not reverse-resolved)"
    • changedInput schema / properties / record_type / description
      Previous value: -"e.g. A, TXT, MX, CNAME, NS, or ANY"New value: +"A, AAAA, CNAME, TXT, MX, NS or ANY (default ANY: all of these are looked up in turn)"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/openWorld, and the description adds genuinely new behavior: queries go off-host, answers may come from a local cache, the resolver is fixed, and failures surface as a specific error ('HOST: no such host'). It even discloses the exact return payload shape and MX formatting.

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

Conciseness4/5

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

Front-loaded with the core purpose and dense with useful detail, and every clause earns its place (default-ANY semantics, error string, sibling routing). It is a long single paragraph, but there is no filler or repetition.

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?

Even without an output schema, the description fully specifies the JSON return shape ('host' plus 'records' of 'type'/'value'), the MX value format, and the empty-records vs. non-existent-name distinction. Nothing an agent needs to call or interpret it is missing.

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

Parameters5/5

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

Schema coverage is 100%, so baseline would be 3, but the description adds real meaning beyond the schema: record_type is case-insensitive, default ANY is not a DNS ANY query but a sequential multi-type lookup, unsupported types are rejected, and host must be a name rather than an IP.

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?

States a specific verb and resource ('Resolves DNS records for a hostname') and immediately scopes it ('through the host's resolver, a DNS server cannot be chosen'), which no sibling shares. An agent can distinguish this from network/ping, network/curl, and network/trace-path without opening their schemas.

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

Usage Guidelines5/5

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

Explicitly routes the agent: 'To test reachability use network/ping, to fetch a URL network/curl.' It also states when-not conditions — IP addresses are not reverse-resolved and SOA/PTR/SRV types are rejected — leaving nothing to inference.

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