Skip to main content
Glama
fredriksknese

mcp-infoblox

create_cname_record

Create DNS CNAME records in Infoblox to map alias domain names to canonical targets, enabling domain redirection and alias management.

Instructions

Create a DNS CNAME record in Infoblox

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAlias FQDN for the CNAME record
canonicalYesCanonical name (target FQDN)
viewNoDNS view
ttlNoTTL in seconds
commentNoComment for the record

Implementation Reference

  • The handler function that executes the create_cname_record tool logic. It accepts parameters (name, canonical, view, ttl, comment), builds a data object, calls client.create('record:cname', data) to create the CNAME record in Infoblox, and returns a success message or error.
    async ({ name, canonical, view, ttl, comment }) => {
      const data: Record<string, unknown> = { name, canonical };
      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:cname", data);
        return toolResult(
          `CNAME record created successfully.\nReference: ${ref}`,
        );
      } catch (error) {
        return toolResult(
          `Error creating CNAME record: ${error}`,
          true,
        );
      }
    },
  • Zod schema definition for the create_cname_record tool inputs. Defines and validates the parameters: name (string, FQDN alias), canonical (string, target FQDN), view (optional string), ttl (optional number), and comment (optional string).
    {
      name: z
        .string()
        .describe("Alias FQDN for the CNAME record"),
      canonical: z
        .string()
        .describe("Canonical name (target FQDN)"),
      view: z.string().optional().describe("DNS view"),
      ttl: z.number().optional().describe("TTL in seconds"),
      comment: z.string().optional().describe("Comment for the record"),
    },
  • Complete registration of the create_cname_record tool with the MCP server using server.tool(). Includes the tool name, description, schema, and handler function.
    server.tool(
      "create_cname_record",
      "Create a DNS CNAME record in Infoblox",
      {
        name: z
          .string()
          .describe("Alias FQDN for the CNAME record"),
        canonical: z
          .string()
          .describe("Canonical name (target FQDN)"),
        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, canonical, view, ttl, comment }) => {
        const data: Record<string, unknown> = { name, canonical };
        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:cname", data);
          return toolResult(
            `CNAME record created successfully.\nReference: ${ref}`,
          );
        } catch (error) {
          return toolResult(
            `Error creating CNAME record: ${error}`,
            true,
          );
        }
      },
    );
  • Helper function toolResult() used to format the response from the tool handler. Creates a standardized response object with content and error status.
    function toolResult(text: string, isError = false) {
      return { content: [{ type: "text" as const, text }], isError };
    }
  • src/index.ts:42-42 (registration)
    Calls registerDnsTools(server, client) to register all DNS tools including create_cname_record with the MCP server instance.
    registerDnsTools(server, client);
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 disclose any behavioral traits: no information about permissions required, whether the operation is idempotent, potential side effects, error conditions, or what happens on success. For a mutation tool with zero annotation coverage, this is a significant gap.

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 with zero waste. It's appropriately sized and front-loaded with the essential information (create DNS CNAME record). Every word earns its place, making it highly concise while still communicating the core purpose.

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?

Given this is a mutation tool (creating DNS records) with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after creation, what permissions are needed, how to handle errors, or differentiate from similar tools. For a 5-parameter tool that modifies infrastructure, more context about behavior and usage is needed.

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 the schema already documents all 5 parameters with good descriptions. The description adds no parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 CNAME record in Infoblox'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like create_a_record or create_mx_record, which would require mentioning it specifically creates CNAME records (canonical name aliases) rather than other DNS record types.

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 many sibling tools for creating different DNS record types (A, AAAA, MX, TXT, etc.), there's no indication that this is specifically for CNAME records or when CNAMEs are appropriate versus other record types. No prerequisites, constraints, or alternatives 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