Skip to main content
Glama
fredriksknese

mcp-infoblox

create_host_record

Create DNS host records in Infoblox by combining A and PTR records, with options for auto-assigning IP addresses and configuring DHCP settings.

Instructions

Create a DNS Host record in Infoblox. Host records combine A and PTR records. Use 'func:nextavailableip:<network_ref>' as ipv4addr to auto-assign the next available IP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFQDN for the host record
ipv4addrsNoIPv4 addresses for the host
ipv6addrsNoIPv6 addresses for the host
viewNoDNS view
ttlNoTTL in seconds
commentNoComment for the record
configure_for_dnsNoConfigure for DNS

Implementation Reference

  • The handler function for 'create_host_record' tool that builds a data object from input parameters and calls client.create('record:host', data) to create the DNS host record in Infoblox. Returns success message with reference or error message.
    async ({
      name,
      ipv4addrs,
      ipv6addrs,
      view,
      ttl,
      comment,
      configure_for_dns,
    }) => {
      const data: Record<string, unknown> = { name };
      if (ipv4addrs) data.ipv4addrs = ipv4addrs;
      if (ipv6addrs) data.ipv6addrs = ipv6addrs;
      if (view) data.view = view;
      if (ttl !== undefined) {
        data.ttl = ttl;
        data.use_ttl = true;
      }
      if (comment) data.comment = comment;
      if (configure_for_dns !== undefined)
        data.configure_for_dns = configure_for_dns;
    
      try {
        const ref = await client.create("record:host", data);
        return toolResult(
          `Host record created successfully.\nReference: ${ref}`,
        );
      } catch (error) {
        return toolResult(
          `Error creating host record: ${error}`,
          true,
        );
      }
    },
  • Zod schema definition for 'create_host_record' tool inputs including name (FQDN), ipv4addrs array (with ipv4addr, optional mac, configure_for_dhcp), ipv6addrs array, view, ttl, comment, and configure_for_dns parameters.
    {
      name: z.string().describe("FQDN for the host record"),
      ipv4addrs: z
        .array(
          z.object({
            ipv4addr: z
              .string()
              .describe(
                "IPv4 address, or 'func:nextavailableip:<network_ref>' for auto-assign",
              ),
            mac: z
              .string()
              .optional()
              .describe("MAC address for DHCP"),
            configure_for_dhcp: z
              .boolean()
              .optional()
              .describe("Enable DHCP for this address"),
          }),
        )
        .optional()
        .describe("IPv4 addresses for the host"),
      ipv6addrs: z
        .array(
          z.object({
            ipv6addr: z.string().describe("IPv6 address"),
          }),
        )
        .optional()
        .describe("IPv6 addresses for the host"),
      view: z.string().optional().describe("DNS view"),
      ttl: z.number().optional().describe("TTL in seconds"),
      comment: z.string().optional().describe("Comment for the record"),
      configure_for_dns: z
        .boolean()
        .optional()
        .default(true)
        .describe("Configure for DNS"),
    },
  • Complete registration of 'create_host_record' tool using server.tool() with name, description, Zod schema, and async handler function.
    server.tool(
      "create_host_record",
      "Create a DNS Host record in Infoblox. Host records combine A and PTR records. Use 'func:nextavailableip:<network_ref>' as ipv4addr to auto-assign the next available IP.",
      {
        name: z.string().describe("FQDN for the host record"),
        ipv4addrs: z
          .array(
            z.object({
              ipv4addr: z
                .string()
                .describe(
                  "IPv4 address, or 'func:nextavailableip:<network_ref>' for auto-assign",
                ),
              mac: z
                .string()
                .optional()
                .describe("MAC address for DHCP"),
              configure_for_dhcp: z
                .boolean()
                .optional()
                .describe("Enable DHCP for this address"),
            }),
          )
          .optional()
          .describe("IPv4 addresses for the host"),
        ipv6addrs: z
          .array(
            z.object({
              ipv6addr: z.string().describe("IPv6 address"),
            }),
          )
          .optional()
          .describe("IPv6 addresses for the host"),
        view: z.string().optional().describe("DNS view"),
        ttl: z.number().optional().describe("TTL in seconds"),
        comment: z.string().optional().describe("Comment for the record"),
        configure_for_dns: z
          .boolean()
          .optional()
          .default(true)
          .describe("Configure for DNS"),
      },
      async ({
        name,
        ipv4addrs,
        ipv6addrs,
        view,
        ttl,
        comment,
        configure_for_dns,
      }) => {
        const data: Record<string, unknown> = { name };
        if (ipv4addrs) data.ipv4addrs = ipv4addrs;
        if (ipv6addrs) data.ipv6addrs = ipv6addrs;
        if (view) data.view = view;
        if (ttl !== undefined) {
          data.ttl = ttl;
          data.use_ttl = true;
        }
        if (comment) data.comment = comment;
        if (configure_for_dns !== undefined)
          data.configure_for_dns = configure_for_dns;
    
        try {
          const ref = await client.create("record:host", data);
          return toolResult(
            `Host record created successfully.\nReference: ${ref}`,
          );
        } catch (error) {
          return toolResult(
            `Error creating host record: ${error}`,
            true,
          );
        }
      },
    );
  • Helper function toolResult() that formats the tool response with content array and optional error flag.
    function toolResult(text: string, isError = false) {
      return { content: [{ type: "text" as const, text }], isError };
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It indicates this is a creation tool (implying a write operation) and provides a useful tip about auto-assigning IPs, but it doesn't cover other behavioral aspects like required permissions, potential side effects (e.g., impact on existing records), error handling, or response format. This leaves gaps in transparency for a mutation tool.

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?

The description is front-loaded with the core purpose in the first sentence, followed by a clarifying detail and a practical usage tip in the second sentence. Every sentence adds value without redundancy, making it efficient and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a DNS host record creation tool with 7 parameters, no annotations, and no output schema, the description is somewhat incomplete. It covers the basic purpose and a key parameter tip but lacks details on behavioral traits, error cases, or return values. This is adequate for a simple tool but could be more comprehensive for this context.

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

Parameters3/5

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

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds value by explaining the purpose of host records and providing a specific example for ipv4addr ('func:nextavailableip:<network_ref>'), which enhances understanding beyond the schema. However, it doesn't elaborate on other parameters, so it meets the baseline for high schema coverage.

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?

The description clearly states the action ('Create a DNS Host record in Infoblox') and specifies the resource type ('Host records combine A and PTR records'). It distinguishes this tool from sibling tools like create_a_record and create_ptr_record by explaining that host records combine both record types, making the purpose specific and differentiated.

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?

The description provides clear context on when to use this tool by mentioning it's for creating host records in Infoblox and offering a specific usage tip ('Use 'func:nextavailableip:<network_ref>' as ipv4addr to auto-assign the next available IP'). However, it doesn't explicitly state when not to use it or name alternatives among siblings, such as using create_a_record or create_ptr_record separately.

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

Install Server

Other Tools

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