Skip to main content
Glama
fredriksknese

mcp-infoblox

create_mx_record

Create a DNS MX record in Infoblox to direct email traffic to the correct mail server by specifying domain, mail exchanger, and priority.

Instructions

Create a DNS MX (mail exchange) record in Infoblox

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFQDN for the MX record (usually the domain)
mail_exchangerYesFQDN of the mail server
preferenceYesMX preference/priority value
viewNoDNS view
ttlNoTTL in seconds
commentNoComment for the record

Implementation Reference

  • Handler function for create_mx_record tool. Takes parameters (name, mail_exchanger, preference, view, ttl, comment), builds a data object, calls client.create('record:mx', data) to create the MX record in Infoblox, and returns success/error message.
    async ({
      name,
      mail_exchanger,
      preference,
      view,
      ttl,
      comment,
    }) => {
      const data: Record<string, unknown> = {
        name,
        mail_exchanger,
        preference,
      };
      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:mx", data);
        return toolResult(
          `MX record created successfully.\nReference: ${ref}`,
        );
      } catch (error) {
        return toolResult(
          `Error creating MX record: ${error}`,
          true,
        );
      }
    },
  • Zod schema definition for create_mx_record tool input validation. Defines parameters: name (FQDN), mail_exchanger (mail server FQDN), preference (MX priority), and optional view, ttl, comment fields.
    {
      name: z
        .string()
        .describe("FQDN for the MX record (usually the domain)"),
      mail_exchanger: z
        .string()
        .describe("FQDN of the mail server"),
      preference: z.number().describe("MX preference/priority value"),
      view: z.string().optional().describe("DNS view"),
      ttl: z.number().optional().describe("TTL in seconds"),
      comment: z.string().optional().describe("Comment for the record"),
    },
  • Registration of create_mx_record tool using server.tool(). Includes tool name, description, schema, and handler function. Part of registerDnsTools function that registers all DNS-related tools.
    server.tool(
      "create_mx_record",
      "Create a DNS MX (mail exchange) record in Infoblox",
      {
        name: z
          .string()
          .describe("FQDN for the MX record (usually the domain)"),
        mail_exchanger: z
          .string()
          .describe("FQDN of the mail server"),
        preference: z.number().describe("MX preference/priority value"),
        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,
        mail_exchanger,
        preference,
        view,
        ttl,
        comment,
      }) => {
        const data: Record<string, unknown> = {
          name,
          mail_exchanger,
          preference,
        };
        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:mx", data);
          return toolResult(
            `MX record created successfully.\nReference: ${ref}`,
          );
        } catch (error) {
          return toolResult(
            `Error creating MX record: ${error}`,
            true,
          );
        }
      },
    );
  • toolResult helper function that formats the response for MCP tools. Returns an object with content array and optional error flag.
    function toolResult(text: string, isError = false) {
      return { content: [{ type: "text" as const, text }], isError };
    }
  • InfobloxClient.create method that makes POST request to Infoblox API. Used by create_mx_record handler to create the MX record via 'record:mx' endpoint.
    async create(
      objectType: string,
      data: Record<string, unknown>,
    ): Promise<string> {
      return this.request("POST", objectType, data) as Promise<string>;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create' implies a write/mutation operation, the description doesn't mention permissions required, whether this operation is idempotent, potential side effects, or what happens on success/failure. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior.

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 a single, efficient sentence that communicates the essential purpose without any wasted words. It's appropriately sized for a tool with a clear function and doesn't bury important information. Every word earns its place.

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

Completeness2/5

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

For a creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, what happens on errors, or any behavioral characteristics. While the schema covers parameters well, the overall context for using this mutation tool is incomplete, especially compared to sibling tools that might have different behaviors.

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?

Schema description coverage is 100%, so all parameters are documented in the schema. The description adds no additional parameter information beyond what's already in the schema. According to the scoring guidelines, when schema coverage is high (>80%), the baseline score is 3 even with no parameter information in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('DNS MX record in Infoblox'), making the purpose immediately understandable. It distinguishes this as an MX record creation tool, which is helpful given the sibling tools include other DNS record types like A, CNAME, and TXT records. However, it doesn't explicitly differentiate from other create_*_record tools beyond the MX type.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like create_a_record, create_cname_record, and create_txt_record, there's no indication that this is specifically for mail exchange records versus other DNS record types. No prerequisites, constraints, or comparison to similar tools are mentioned.

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