Skip to main content
Glama
NetBox MCP Server

NetBox MCP Server

Official
by netboxlabs

netbox_search_objects

Read-only

Search NetBox objects across devices, sites, IP addresses, VLANs, racks, circuits, and VMs by name, IP, serial, or tag, with optional type and field filters.

Instructions

Perform global search across NetBox infrastructure.

Searches names, descriptions, IP addresses, serial numbers, asset tags,
and other key fields across multiple object types.

Args:
    query: Search term (device names, IPs, serial numbers, hostnames, site names)
           Examples: 'switch01', '192.168.1.1', 'NYC-DC1', 'SN123456'
    object_types: Limit search to specific types (optional)
                 Default: [dcim.device', 'dcim.site', 'ipam.ipaddress', 'dcim.interface', 'dcim.rack', 'ipam.vlan', 'circuits.circuit', 'virtualization.virtualmachine]
                 Examples: ['dcim.device', 'ipam.ipaddress', 'dcim.site']
    fields: Optional list of specific fields to return (reduces response size) IT IS STRONGLY RECOMMENDED TO USE THIS PARAMETER TO MINIMIZE TOKEN USAGE.
            - None or [] = returns all fields (no filtering)
            - ['id', 'name'] = returns only specified fields
            Examples: ['id', 'name', 'status'], ['address', 'dns_name']
            Uses NetBox's native field filtering via ?fields= parameter
    limit: Max results per object type (default 5, max 100)

Returns:
    Dictionary with object_type keys and list of matching objects.
    All searched types present in result (empty list if no matches).

Example:
    # Search for anything matching "switch"
    results = netbox_search_objects('switch')
    # Returns: {
    #   'dcim.device': [{'id': 1, 'name': 'switch-01', ...}],
    #   'dcim.site': [],
    #   ...
    # }

    # Search for IP address
    results = netbox_search_objects('192.168.1.100')
    # Returns: {
    #   'ipam.ipaddress': [{'id': 42, 'address': '192.168.1.100/24', ...}],
    #   ...
    # }

    # Limit search to specific types with field projection
    results = netbox_search_objects(
        'NYC',
        object_types=['dcim.site', 'dcim.location'],
        fields=['id', 'name', 'status']
    )

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": {
      "query": "<query>"
    },
    "name": "netbox_search_objects"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
fieldsNo
object_typesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.1/5.0
Behavior4/5

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

The readOnlyHint annotation already establishes that this is a safe read operation. The description adds useful behavioral context beyond that: it searches across multiple object types, reports all searched types with empty lists when there are no matches, applies a per-type limit, and supports field projection to reduce response size. It does not cover match semantics, permissions, or rate limits, so it is not fully exhaustive.

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?

The description is front-loaded and clearly structured into purpose, args, returns, and examples. It is somewhat verbose because the Returns section and multiple examples partially duplicate what the output schema already provides, but the examples are useful for a multi-type search tool.

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?

The tool has moderate complexity, four parameters, and an output schema; the description still covers all parameters fully, explains the multi-type result shape, and gives practical examples. Given that the output schema already documents return values, the definition is complete enough for an agent to invoke the tool correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the burden, and it does. It documents all four parameters: query with examples, object_types with a default list and examples, fields with None versus list behavior and a token-usage recommendation, and limit with its default and maximum.

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 states a specific verb and resource: 'Perform global search across NetBox infrastructure.' It explains that the search spans names, descriptions, IPs, serials, tags, and multiple object types. It does not explicitly distinguish this from sibling tools such as netbox_get_objects or netbox_get_object_by_id, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description implies usage through examples like searching for 'switch01' or an IP address, and the global-search framing suggests it is for broad lookup across object types. However, it gives no explicit when-to-use or when-not-to-use guidance relative to sibling tools, and no alternatives are named.

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