Create a DNS record
lw_record_createCreate a DNS record with a preview of changes and conflict checks, then confirm to apply it. Supports A, AAAA, ALIAS, CNAME, MX, NS, PTR, SRV, and TXT records.
Instructions
Create a DNS record (v1 Network/DNS/Record/create). name may be relative ("www"), "@" for the apex, or fully qualified. For MX and SRV put the priority in prio, not rdata (rdata "10 mail.example.com" is split for you). SRV rdata is "weight port target". Preview shows the records at that name before and after, and flags conflicts such as CNAME at the apex, CNAME next to other records, or an exact duplicate. Write: needs LW_ALLOW_WRITES, then a confirmation step (preview first).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"type": "<type>",
"rdata": "<rdata>"
},
"name": "lw_record_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | TTL in seconds (Liquid Web default if omitted). | |
| name | Yes | Record name: "@", "www", or "www.example.com". | |
| prio | No | Priority for MX and SRV. | |
| type | Yes | Record type. The v1 API accepts A, AAAA, ALIAS, CNAME, MX, NS, PTR, SRV, TXT (no CAA). | |
| zone | No | Zone name, e.g. "example.com". Give this or zone_id. | |
| rdata | Yes | Record data: IP for A/AAAA, hostname for CNAME/MX/NS/ALIAS/PTR, text for TXT (no quotes needed), "weight port target" for SRV. | |
| context | No | Auth context name (like lw-cli contexts). Omit to use the default. lw_contexts lists them. | |
| zone_id | No | Numeric zone id from lw_zone_list. Give this or zone. | |
| confirm_token | No | Leave empty on the first call to get a preview and a token. Repeat the call with identical parameters plus this token to execute. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| error | No | ||
| status | Yes | ||
| context | No | ||
| preview | No | ||
| summary | Yes | ||
| warnings | No | ||
| next_page | No | ||
| next_step | No | ||
| truncated | No | ||
| expires_at | No | ||
| confirm_token | No |