Skip to main content
Glama
NetBox MCP Server

NetBox MCP Server

by mhajder

Netbox Get Prefix Utilization

netbox_get_prefix_utilization
Read-onlyIdempotent

Compute utilization for specified prefixes from child address space and utilized IPs to match the NetBox UI when the REST API omits usage data.

Instructions

Get the utilization of prefixes, as shown in the NetBox UI.

A container counts the address space of its child prefixes; any other prefix counts its IP addresses plus IP ranges marked utilized. NetBox's REST API does not return this, so it is computed from the children.

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": {
      "prefix_ids": "<prefix_ids>"
    },
    "name": "netbox_get_prefix_utilization"
  }
}

Input Schema

NameRequiredDescriptionDefault
prefix_idsYesPrefix IDs. Find them with netbox_get_objects on 'ipam.prefix' (e.g. filters={'site_id': 1}).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely new behavioral context: the metric is not available from the API and is computed internally, and the counting rule differs by prefix kind (containers count child prefix space; others count IPs plus utilized ranges). That counting asymmetry is exactly the sort of thing an agent would otherwise have to guess, though no cost or latency caveat is given for the fan-out of up to 25 prefixes.

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 what the tool returns, then the mechanism, then why it exists. Every clause earns its place; the only flaw is the awkward mid-sentence line break after "child prefixes;" and the slightly dangling "any other" reference back to "prefixes."

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

Completeness4/5

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

With an output schema present, the description needn't document return fields, and it correctly spends its budget on the computation semantics instead. For a one-parameter read tool with full annotations, this is close to complete — only edge-case behavior (e.g. what happens when a container's children are themselves containers, or when a prefix has no children) is left implicit.

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

Parameters4/5

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

Schema coverage is 100% and the prefix_ids field already documents its own discovery path via netbox_get_objects on 'ipam.prefix'. The description contributes the container-vs-leaf distinction, which is meaningful because the two prefix kinds produce different metrics from the same input, so an agent knows a single ID may return either flavor of utilization. The 25-item ceiling is left to the schema.

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?

States a specific verb and resource ("Get the utilization of prefixes") and immediately qualifies the metric with "as shown in the NetBox UI," which tells the agent this is a derived value rather than a raw field. It doesn't name a sibling, but no sibling computes utilization, so the distinguishing scope is clear from the semantics alone.

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 line "NetBox's REST API does not return this, so it is computed from the children" is an explicit rationale for choosing this tool over netbox_get_objects — the agent learns the value cannot be obtained from the underlying listing tool. What's missing is only a pointer that netbox_get_objects is the way to discover prefix_ids (that pointer lives in the schema, not the description).

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