# Dns type code lookup

`dns-type-code-lookup` · version 1.0.0 · Communications · free, no key needed

Look up a pinned DNS RR type mnemonic or its numeric code.

**Use when you need to: dns type mnemonic to number · lookup dns rr type code · iana dns type code table.**

## Decide before calling

Read the [versioned contract](/v1/tools/dns-type-code-lookup/versions/1.0.0) and the supported scope below. Reuse `dns-type-code-lookup@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `dns-type-code-lookup@1.0.0` for dns type mnemonic to number. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- dns type mnemonic to number
- lookup dns rr type code
- iana dns type code table
- what number is this dns record type
- convert dns rrtype name and code
- dns type code for a aaaa mx soa srv
- איתור קוד סוג רשומת דיאן אס

## Not supported

- encode or decode DNS RDATA
- query a DNS resolver
- accept private-use type codes outside the pinned excerpt

## Behavior

- Provide exactly one of name or code. name is an uppercase mnemonic from the pinned excerpt, or * . ANY is an alias of the RFC 1035 QTYPE * (255) and the returned name is *.
- code is an integer from 0 to 65535. A code or mnemonic that is not in the pinned excerpt is unsupported_input. A lowercase name, an empty name, or a non-integer is invalid_input.
- The excerpt is a bounded set of RR type codes whose numbers are fixed by the cited RFCs, pinned as iana-dns-parameters-2026-10-21. It is not a claim that every IANA code is present.
- Output is the canonical name, the numeric code, and the defining document. No RDATA is parsed and no DNS query is sent.
- More than 512 UTF-8 bytes of JSON input, or a name longer than 10 characters, is limit_exceeded.

## Input

- `name` (string, optional): min length 1; max length 10
- `code` (integer, optional): min 0; max 65535

## Output

- `data_version` (constant "iana-dns-parameters-2026-10-21", required)
- `name` (string, required): min length 1; max length 10
- `code` (integer, required): min 0; max 65535
- `defining_document` (string, required): min length 8; max length 12

## Limits

- max input bytes: 512
- max name chars: 10

## Example

Request input:

```json
{
  "name": "AAAA"
}
```

Response:

```json
{
  "result": {
    "data_version": "iana-dns-parameters-2026-10-21",
    "name": "AAAA",
    "code": 28,
    "defining_document": "RFC 3596"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "dns-type-code-lookup",
  "version": "1.0.0",
  "input": {
    "name": "AAAA"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/dns-type-code-lookup/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"name":"AAAA"}'
```

The machine-readable contract is at [/v1/tools/dns-type-code-lookup/versions/1.0.0](/v1/tools/dns-type-code-lookup/versions/1.0.0).

### CLI

```sh
node cli.mjs run dns-type-code-lookup 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Dns class code lookup](/tools/dns-class-code-lookup): Look up a pinned DNS class mnemonic or its numeric code.
- [Dns rdata encode](/tools/dns-rdata-encode): Encode DNS RDATA for A, AAAA, NS, CNAME, PTR, MX, TXT, SOA, SRV, or unknown hex.
- [Dns rdata decode](/tools/dns-rdata-decode): Decode DNS RDATA hex for A, AAAA, NS, CNAME, PTR, MX, TXT, SOA, SRV, or unknown.
- [Dns header flags explain](/tools/dns-header-flags-explain): Explain an RFC 1035 DNS header flags word, with reserved Z as an integer 0 through 7.
- [Dns message encode](/tools/dns-message-encode): Encode a structured DNS message to canonical uncompressed RFC 1035 wire hex.
- [Email address list format](/tools/email-address-list-format): Format mailboxes and groups as one deterministic RFC 5322 address-list.
