{
  "name": "dns-lookup",
  "summary": "DNS records for a domain (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA) with their TTLs.",
  "rationale": "A DNS query needs the network, so an agent cannot answer it on its own. It is what you run in a loop over a list of domains.",
  "family": "domain",
  "price_usd": "0",
  "free": true,
  "timeout_ms": 5000,
  "max_timeout_seconds": 6,
  "input_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "domain": {
        "description": "Fully qualified domain name to resolve, up to 253 characters; it is trimmed, lowercased and stripped of trailing dots, and IP literals, single-label names and private suffixes such as .local or .internal are refused.",
        "type": "string",
        "minLength": 1,
        "maxLength": 253
      },
      "types": {
        "description": "Record types to query, from a, aaaa, mx, txt, ns, cname, soa and caa in either case; duplicates collapse to one query per type, answers come back in that fixed order, and the default is all eight.",
        "minItems": 1,
        "maxItems": 16,
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "a",
            "aaaa",
            "mx",
            "txt",
            "ns",
            "cname",
            "soa",
            "caa",
            "A",
            "AAAA",
            "MX",
            "TXT",
            "NS",
            "CNAME",
            "SOA",
            "CAA"
          ]
        }
      }
    },
    "required": [
      "domain"
    ],
    "additionalProperties": false
  },
  "input_example": {
    "domain": "example.com",
    "types": [
      "a",
      "mx"
    ]
  },
  "output_example": {
    "domain": "example.com",
    "types_requested": [
      "a",
      "mx"
    ],
    "records": [
      {
        "type": "a",
        "values": [
          {
            "address": "93.184.215.14",
            "ttl": 3600
          }
        ],
        "truncated": false,
        "resolution_error": null
      },
      {
        "type": "mx",
        "values": [
          {
            "exchange": "mail.example.com",
            "priority": 10
          }
        ],
        "truncated": false,
        "resolution_error": null
      }
    ],
    "queried_at": "2026-08-26T18:00:00.000Z"
  },
  "errors": [
    "invalid_input",
    "unreachable_target",
    "upstream_timeout"
  ]
}