Skip to main content
Glama

bgp_sessions

List BGP session status including remote address, AS, state, uptime, and prefix count. Handles RouterOS 6 and 7 differences, returning empty for devices without BGP.

Instructions

List BGP session status: remote-address/remote-as, state (established/idle/...), uptime, prefix-count.

RouterOS exposes this under two different paths depending on generation, the same split wireless_registrations already handles for wifi: ROS7's routing package (/routing/bgp/session) or ROS6's (/routing/bgp/peer). This tries ROS7 first, falls back to ROS6, and returns an empty list - rather than raising - for a device that doesn't run BGP at all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does well: it explains the ROS7/ROS6 path split, the fallback order, and that a non-BGP device yields an empty list instead of an error. That error-suppression detail is exactly the kind of behavior an agent must know to interpret an empty result correctly. It stops short of covering permissions or rate limits.

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?

Front-loaded with the return contents in sentence one, then the generation-handling caveat. The ROS6/ROS7 paragraph is slightly long and references a sibling (wireless_registrations) that is tangentially relevant, but nothing is wasted outright.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no prose explanation, and the description still covers the runtime quirks (generation split, empty-list fallback) an agent needs. Only the device_name parameter lacks any descriptive detail.

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

Parameters3/5

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

Schema description coverage is 0%, so the description should ideally compensate, but it never mentions device_name or its expected format (e.g. hostname vs IP). The single parameter is self-describing by name, which keeps this at a minimum-viable 3 rather than lower.

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 opens with a specific verb and resource ('List BGP session status') and enumerates the returned fields (remote-address/remote-as, state, uptime, prefix-count), so the agent knows exactly what this tool produces. It is distinguishable from siblings such as ospf_neighbors or ip_routes by resource, though it never names those alternatives explicitly.

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 explains internal path-fallback behavior (ROS7 first, ROS6 second) which implicitly tells the agent this is the single entry point for BGP data regardless of RouterOS generation. It does not, however, state when to prefer this over a generic interface monitor or neighbor tool, nor any prerequisites beyond device_name.

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

Deploy Server

Other Tools