Skip to main content
Glama

Apply a bulk DNS import plan

lw_zone_import_apply

Applies 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

NameRequiredDescriptionDefault
planYesThe plan object from lw_zone_import_plan, unchanged.
contextNoAuth context name (like lw-cli contexts). Omit to use the default. lw_contexts lists them.
plan_hashYesplan_hash from lw_zone_import_plan.
confirm_tokenNoLeave 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

NameRequiredDescriptionDefault
okYes
dataNo
errorNo
statusYes
contextNo
previewNo
summaryYes
warningsNo
next_pageNo
next_stepNo
truncatedNo
expires_atNo
confirm_tokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: it re-verifies plan_hash and the live zone and refuses on drift, applies operations sequentially via the v1 Record API, halts on first error and reports partial progress, and never retries a write. It also discloses the gated destructive path (deletes require LW_ALLOW_DESTRUCTIVE), which reconciles the destructiveHint=false annotation with a tool that can delete once explicitly opted in.

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

Conciseness5/5

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

Front-loaded with the action and the required hand-off from the planner, then the safety/confirmation protocol, then the env flags. Every sentence carries a distinct operational fact; no filler or restatement of the title.

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?

For a mutating, non-idempotent, nested-schema tool this covers what an agent most needs: prerequisites, the preview/confirm handshake, drift refusal, partial-failure reporting, and no-retry semantics. An output schema exists, so return-shape detail is unnecessary here.

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

Parameters4/5

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

Schema description coverage is 100%, so plan/plan_hash/confirm_token/context are already documented. The description still adds a meaningful constraint by insisting plan and plan_hash be passed "exactly as returned" (no mutation of the plan object), which is a semantic rule the schema cannot express.

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 ("Apply a plan") and immediately names the producing sibling lw_zone_import_plan, so the agent knows this is the execution half of a plan/apply pair rather than a planning or editing tool. The scope (bulk DNS import) is unambiguous against siblings like lw_zone_update or lw_zone_bulk_ttl.

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

Usage Guidelines4/5

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

Gives a clear sequencing rule: call without confirm_token for a preview and token, then repeat with identical parameters plus the token to execute, plus prerequisites (LW_ALLOW_WRITES, LW_ALLOW_DESTRUCTIVE for deletes). It does not explicitly say when to prefer other tools (e.g., single-record edits via lw_zone_update), so it falls just short of full when/when-not coverage.

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

Deploy Server

Other Tools