create_aaaa_record
Add an IPv6 address to DNS by creating an AAAA record in Infoblox, specifying the FQDN and IPv6 address.
Instructions
Create a DNS AAAA (IPv6) record in Infoblox
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | FQDN for the AAAA record | |
| ipv6addr | Yes | IPv6 address for the record | |
| view | No | DNS view | |
| ttl | No | TTL in seconds | |
| comment | No | Comment for the record |
Implementation Reference
- src/tools/dns.ts:187-218 (handler)Complete tool registration with handler function that creates AAAA (IPv6) DNS records. The handler constructs the data object with name and ipv6addr as required fields, optionally includes view, ttl (with use_ttl flag), and comment, then calls client.create() to make the API request and returns success/error message.
server.tool( "create_aaaa_record", "Create a DNS AAAA (IPv6) record in Infoblox", { name: z.string().describe("FQDN for the AAAA record"), ipv6addr: z.string().describe("IPv6 address for the record"), view: z.string().optional().describe("DNS view"), ttl: z.number().optional().describe("TTL in seconds"), comment: z.string().optional().describe("Comment for the record"), }, async ({ name, ipv6addr, view, ttl, comment }) => { const data: Record<string, unknown> = { name, ipv6addr }; if (view) data.view = view; if (ttl !== undefined) { data.ttl = ttl; data.use_ttl = true; } if (comment) data.comment = comment; try { const ref = await client.create("record:aaaa", data); return toolResult( `AAAA record created successfully.\nReference: ${ref}`, ); } catch (error) { return toolResult( `Error creating AAAA record: ${error}`, true, ); } }, ); - src/tools/dns.ts:190-196 (schema)Zod schema defining the input parameters for create_aaaa_record tool: name (required FQDN string), ipv6addr (required IPv6 address string), view (optional DNS view), ttl (optional number in seconds), and comment (optional string).
{ name: z.string().describe("FQDN for the AAAA record"), ipv6addr: z.string().describe("IPv6 address for the record"), view: z.string().optional().describe("DNS view"), ttl: z.number().optional().describe("TTL in seconds"), comment: z.string().optional().describe("Comment for the record"), }, - src/index.ts:42-42 (registration)Registration call in the main entry point that invokes registerDnsTools function, passing the MCP server instance and InfobloxClient instance to register all DNS tools including create_aaaa_record.
registerDnsTools(server, client); - src/infoblox-client.ts:79-84 (helper)Helper method in InfobloxClient class that makes POST request to create a new object. Called by the handler with objectType 'record:aaaa' and the data object to create the AAAA record via the Infoblox WAPI.
async create( objectType: string, data: Record<string, unknown>, ): Promise<string> { return this.request("POST", objectType, data) as Promise<string>; } - src/tools/dns.ts:30-32 (helper)Helper function that formats the response content for MCP tools. Returns an object with content array containing text and an isError flag, used by the handler to return success or error messages.
function toolResult(text: string, isError = false) { return { content: [{ type: "text" as const, text }], isError }; }