Skip to main content
Glama

Bgp Sessions

bgp_sessions
Read-onlyIdempotent

List BGP sessions from network devices, applying filters by ASN, state, address, or family to monitor peering status and diagnose connectivity issues.

Instructions

List BGP sessions from LibreNMS with optional filters.

Returns: dict: The JSON response from the API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnNoFilter by local ASN
limitNoMaximum number of results to return
offsetNoNumber of results to skip (offset) for pagination
hostnameNoFilter by device hostname
bgp_descrNoFilter by BGP description (SQL LIKE)
bgp_stateNoFilter by BGP state (e.g., established)
bgp_familyNoFilter by address family: 4 (IPv4) or 6 (IPv6)
remote_asnNoFilter by remote ASN
local_addressNoFilter by local IP address
bgp_adminstateNoFilter by admin state (start, stop, running)
remote_addressNoFilter by remote IP address

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.10.3
    • changedInput schema / properties / asn / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / bgp_family / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Maximum number of results to return",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Number of results to skip (offset) for pagination",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / remote_asn / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv1.9.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows this is a safe read operation. The description adds the source system (LibreNMS) and a redundant return-type note, but no substantive behavioral context such as pagination semantics or how filters combine. It does not contradict the annotations.

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?

The description is short and front-loaded with the core purpose in the first sentence. The 'Returns: dict' line is somewhat redundant given the output schema, so it does not fully earn its place, but the overall size and structure are appropriate.

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?

For a read-only list tool with an output schema and 100% parameter coverage in the schema, the description conveys the essential action and source. It does not mention pagination details beyond the limit/offset parameters or the singular sibling for single-session lookup, but these are discoverable. The description is slightly thin yet adequate for selection and invocation.

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 100%, so each of the 11 parameters is already documented in the input schema. The description's 'optional filters' generalizes the parameter set but adds no meaning beyond what the schema provides. A baseline score of 3 is appropriate because the schema carries the semantic load.

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 states a specific action and resource: 'List BGP sessions from LibreNMS with optional filters.' This clearly identifies what the tool does and avoids tautology. However, it does not explicitly contrast with the sibling tools bgp_session_get or bgp_session_edit, so differentiation relies mostly on the plural 'sessions' vs. singular naming.

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 phrase 'with optional filters' implies that this is the listing/filtering entry point for BGP sessions, which is useful contextual guidance. However, there is no explicit when-to-use, when-not-to-use, or reference to alternatives such as bgp_session_get for a single session or bgp_session_edit for modifications. The intended usage is implied rather than stated.

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