Apply a bulk DNS import plan
lw_zone_import_applyApplies a DNS zone import plan to execute planned record creates, updates, or deletes after rechecking the plan hash and live zone; stops at the first write error.
Instructions
Apply a plan from lw_zone_import_plan. Pass plan and plan_hash exactly as returned. Re-checks the hash and the live zone first and refuses if the zone changed in a way that alters the plan. Applies operations one by one through the v1 Record API, stops at the first error and reports what was applied. Never retries a write. Plans with deletes also need LW_ALLOW_DESTRUCTIVE. 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": {
"plan": "<plan>",
"plan_hash": "<plan_hash>"
},
"name": "lw_zone_import_apply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | The plan object from lw_zone_import_plan, unchanged. | |
| context | No | Auth context name (like lw-cli contexts). Omit to use the default. lw_contexts lists them. | |
| plan_hash | Yes | plan_hash from lw_zone_import_plan. | |
| 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 |