Skip to main content
Glama
fredriksknese

mcp-infoblox

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
NameRequiredDescriptionDefault
nameYesFQDN for the AAAA record
ipv6addrYesIPv6 address for the record
viewNoDNS view
ttlNoTTL in seconds
commentNoComment for the record

Implementation Reference

  • 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,
          );
        }
      },
    );
  • 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);
  • 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>;
    }
  • 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 };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fredriksknese/mcp-infoblox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server