set_dnssec
Configure or remove DNSSEC security for domains by setting flags, algorithm, and public key, or clearing existing settings.
Instructions
Set or clear DNSSEC for a domain. To enable, provide flags, algorithm, and public_key. To disable, set clear to true.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to configure DNSSEC for | |
| clear | No | Set to true to remove DNSSEC from the domain | |
| flags | No | DNSSEC flags (e.g., '257' for KSK) | |
| algorithm | No | DNSSEC algorithm number (e.g., '13' for ECDSAP256SHA256) | |
| public_key | No | DNSSEC public key |
Implementation Reference
- src/tools/dns.ts:210-265 (handler)The MCP tool handler for 'set_dnssec' which parses arguments and calls the dynadot client.
// ─── set_dnssec ─────────────────────────────────────────────── server.tool( "set_dnssec", "Set or clear DNSSEC for a domain. To enable, provide flags, algorithm, " + "and public_key. To disable, set clear to true.", { domain: z.string().describe("Domain name to configure DNSSEC for"), clear: z .boolean() .optional() .describe("Set to true to remove DNSSEC from the domain"), flags: z .string() .optional() .describe("DNSSEC flags (e.g., '257' for KSK)"), algorithm: z .string() .optional() .describe("DNSSEC algorithm number (e.g., '13' for ECDSAP256SHA256)"), public_key: z .string() .optional() .describe("DNSSEC public key"), }, async ({ domain, clear, flags, algorithm, public_key }) => { try { if (clear) { const result = await client.clearDnssec(domain); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } const params: Record<string, string> = {}; if (flags) params.flags = flags; if (algorithm) params.algorithm = algorithm; if (public_key) params.public_key = public_key; const result = await client.setDnssec(domain, params); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [ { type: "text" as const, text: `Failed to set DNSSEC: ${msg}` }, ], isError: true, }; } } ); - src/services/dynadot-client.ts:226-228 (handler)The Dynadot client method that makes the API request for 'set_dnssec'.
async setDnssec(domain: string, params: Record<string, string>): Promise<DynadotResponse> { return this.call("set_dnssec", { domain_name: domain, ...params }); }