netbox_get_object_by_id
Retrieve detailed NetBox object data by object type and ID, with optional field filtering or brief output to reduce token usage.
Instructions
Get detailed information about a specific NetBox object by its ID.
Args: object_type: String representing the NetBox object type (e.g. "dcim.device", "ipam.ipaddress") object_id: The numeric ID of the object fields: Optional list of specific fields to return IMPORTANT: ALWAYS USE THIS PARAMETER TO MINIMIZE TOKEN USAGE Field filtering reduces response payload by 80-90% and is critical for performance.
- None or [] = returns all fields (NOT RECOMMENDED - use only when you need complete objects)
- ['id', 'name'] = returns only specified fields (RECOMMENDED)
Examples:
- For basic info: ['id', 'name', 'status']
- For devices: ['id', 'name', 'status', 'site']
- For IP addresses: ['address', 'dns_name', 'vrf', 'status']
Uses NetBox's native field filtering via ?fields= parameter.
**Always specify only the fields you actually need.**
brief: returns only a minimal representation of the object in the response.
This is useful when you need only a summary of the object without any related data.Returns: Object dict (complete or with only requested fields based on fields parameter)
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": {
"object_type": "<object_type>",
"object_id": "<object_id>"
},
"name": "netbox_get_object_by_id"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brief | No | ||
| fields | No | ||
| object_id | Yes | ||
| object_type | Yes |