Skip to main content
Glama
NetBox MCP Server

NetBox MCP Server

Official
by netboxlabs

Netbox Get Available Prefixes

netbox_get_available_prefixes
Read-only

Find free IP prefix space within a parent prefix by excluding child prefixes; read-only, so verify directly assigned IPs/ranges before treating candidates as empty.

Instructions

Find space inside a prefix that is not covered by a child prefix. Read-only.

Only child prefixes are considered. IP addresses and IP ranges assigned directly under the parent are not subtracted, so check ipam.ipaddress and ipam.iprange (e.g. with the "parent" filter) before treating a candidate as empty.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "parent_id": "<parent_id>"
    },
    "name": "netbox_get_available_prefixes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax number of items returned (default 5, max 100)
vrf_idNoOptional VRF check. Pass a VRF ID, or "global" for the global table. The call fails if the parent prefix is in a different VRF.
parent_idYesID of the parent prefix (ipam.prefix)
prefix_lengthNoOptional mask length (e.g. 26). When set, free blocks too small are dropped and the rest are split into candidates of this size. When omitted, free blocks are returned as NetBox reports them (maximal blocks, e.g. 10.0.4.0/22).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.0

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, and the description's 'Read-only' line merely restates that. The genuinely valuable addition is the disclosure that directly-assigned IP addresses and ranges are NOT subtracted from free space, which prevents a serious misinterpretation of results. Beyond that caveat it says nothing about ordering, VRF behavior, or failure modes that the schema does not already cover.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core purpose, then the scope restriction, then the caveat. The only waste is the 'Read-only.' sentence, which duplicates the readOnlyHint annotation, but it costs little.

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

Completeness5/5

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

An output schema exists, so return values need not be explained, and the safety profile is covered by annotations. The description fills the one gap structured data cannot express, namely that free space may still contain directly-assigned addresses, making the definition complete for this tool's complexity.

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 limit, vrf_id, parent_id, and prefix_length are all fully documented in the schema itself, including the subtle splitting behavior of prefix_length. The description adds no parameter-level meaning, so the baseline of 3 applies; the 'parent' filter reference pertains to other resources, not this tool's inputs.

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 uses a specific verb and resource: 'Find space inside a prefix that is not covered by a child prefix', and the second paragraph narrows the computation to child prefixes only. It never names or contrasts a sibling tool, so an agent must infer routing from semantics alone rather than explicit differentiation.

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?

It gives clear operating context, including a concrete pre-condition: check ipam.ipaddress and ipam.iprange (with the 'parent' filter) before treating a candidate as empty. That is actionable guidance for using the result, though it offers no explicit when-not-to-use or named alternative tool.

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