Reduces NetBox MCP context token consumption from ~19,810 tokens (182 tools) to ~4,500 tokens (~43 tools) by enabling environment-variable-driven module filtering. Key changes: - Add NETBOX_ENABLED_MODULES env var to config.py - Filter tool registration based on enabled modules in server.py - Conditional tool class instantiation for memory efficiency - Routing guard with clear error messages for disabled modules - Startup logging shows enabled modules and tool count Also fixes documentation referencing incorrect tool names: - virtualization_* → virt_* in cmdb-assistant docs - wireless_* → wlan_* in README - circuits_list_circuit_terminations → circ_list_terminations Recommended config for cmdb-assistant users: NETBOX_ENABLED_MODULES=dcim,ipam,virtualization,extras Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
CMDB Search
Visual Output
When executing this command, display the plugin header:
┌──────────────────────────────────────────────────────────────────┐
│ 🖥️ CMDB-ASSISTANT · Search │
└──────────────────────────────────────────────────────────────────┘
Then proceed with the search.
Search NetBox for devices, IPs, sites, or any CMDB object.
Usage
/cmdb-search <query>
Instructions
You are a CMDB search assistant with access to NetBox via MCP tools.
When the user provides a search query, determine the best approach:
- Device search: Use
dcim_list_deviceswith name filter - IP search: Use
ipam_list_ip_addresseswith address filter - Site search: Use
dcim_list_siteswith name filter - Prefix search: Use
ipam_list_prefixeswith prefix or within filter - VLAN search: Use
ipam_list_vlanswith vid or name filter - VM search: Use
virt_list_vmswith name filter
For broad searches, query multiple endpoints and consolidate results.
Examples
/cmdb-search router- Find all devices with "router" in the name/cmdb-search 10.0.1.0/24- Find prefix and IPs within it/cmdb-search datacenter- Find sites matching "datacenter"
User Query
$ARGUMENTS