get_device_bgp
Retrieve a managed device's configured BGP settings from FortiManager, including resolved neighbors, AS, and networks, to verify routing configuration rather than live session state.
Instructions
Get a managed device's BGP configuration from FortiManager's device DB.
Reads the router bgp config FortiManager holds for the device --
the result of any BGP template plus local settings, with variables
resolved. This is configuration, not runtime state: it says which
neighbors are configured, not whether they are established.
Args:
device: Managed device name (e.g. "FGT-HQ")
vdom: VDOM name (default: "root")
summary_only: Leave out the raw bgp object, which lists some 150
fields per neighbor (default: False)
Returns:
dict with keys:
- device, vdom
- bgp: raw router/bgp config object (neighbor password
stripped -- see _BGP_SECRET_FIELDS), unless summary_only
- summary: condensed AS/router-id/neighbors/networks
- error / error_code: on failure
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": {
"device": "<device>"
},
"name": "get_device_bgp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vdom | No | root | |
| device | Yes | ||
| summary_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||