Skip to main content
Glama
netboxlabs

NetBox MCP Server

Official
by netboxlabs

netbox_search_objects

Perform global search across NetBox for names, IPs, serial numbers, and other key fields. Limit results by object type and field projection.

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']
    )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
fieldsNo
object_typesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description bears full burden. It fully discloses behavior: returns a dictionary with object_type keys, limits per type (default 5, max 100), supports field filtering, and explains the result structure (empty lists for types with no matches). No contradictions.

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

Conciseness3/5

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

The description is quite long, spanning several paragraphs with multiple examples. While well-structured with Args, Returns, and Examples sections, it is not concise. The length is justified by the wealth of information, but it could be trimmed slightly.

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?

Given the tool's complexity (4 parameters, output schema exists), the description is very complete. It covers search scope, all parameters with details, return format, and multiple examples. There are no apparent gaps in informing the AI agent about how to use 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%, but the description compensates thoroughly. Each parameter is explained with examples: 'query' with sample search terms, 'object_types' with default list and examples, 'fields' with recommendation and examples, 'limit' with default and max. This adds significant meaning beyond the bare schema.

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

Purpose5/5

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

The description clearly states 'Perform global search across NetBox infrastructure' and lists the fields searched (names, descriptions, IPs, etc.). This distinguishes it from sibling tools like netbox_get_object_by_id (single object retrieval) and netbox_get_objects (likely list/retrieve without search), making the purpose unambiguous.

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 description provides extensive guidance: when to use (global search), detailed parameter explanations, examples for various search terms, and a strong recommendation to use the 'fields' parameter to minimize token usage. However, it does not explicitly state when not to use this tool or compare directly with siblings within the description.

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/netboxlabs/netbox-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server