Skip to main content
Glama

pt_apply_bgp

Configure and verify BGP on a Cisco router through IOS CLI, including ASN, neighbors, and networks; use dry run to validate commands before deployment.

Instructions

Configures BGP on a router through IOS CLI, each line verified (router bgp, neighbor <ip> remote-as, network <net> mask <mask>). Measured on a 2911 in PT 9.

  • router: router name in PT.

  • asn: local AS, 1-65535 (4-byte ASNs were not measured).

  • neighbors: [{"ip": "10.0.0.2", "remote_as": 65002}]; remote_as == asn is iBGP. With PT connected, a neighbor off every connected subnet is a warning.

  • networks: CIDR list, host bits zero, e.g. ["192.168.1.0/24"]. BGP only advertises a network that is in the routing table with that exact mask. show running-config prints a classful one without mask.

  • dry_run: validate and return the CLI/payload without sending.

Example: pt_apply_bgp(router="R1", asn=65001, neighbors=[{"ip": "10.0.0.2", "remote_as": 65002}], networks=["192.168.1.0/24"]) Check: pt_cli(device="R1", commands=["show ip bgp summary"]).

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": {
      "router": "<router>",
      "asn": "<asn>"
    },
    "name": "pt_apply_bgp"
  }
}

Input Schema

NameRequiredDescriptionDefault
asnYes
routerYes
dry_runNo
networksNo
neighborsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses per-line verification, the tested platform (2911 / PT 9), a known limitation (4-byte ASNs not measured), an advisory condition (neighbor off every connected subnet is a warning), and the routing-table/mask prerequisite for network advertisement. The dry_run contract and the classful output caveat in show running-config are exactly the kind of behavior an agent cannot infer from schema alone.

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 one-sentence purpose is front-loaded and the per-parameter bullets plus a worked example make scanning easy. It is dense and uses inline code formatting heavily, so it is slightly longer than strictly necessary, but no line is filler.

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

Completeness5/5

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

For a five-parameter mutation tool with an output schema available, the description covers platform constraints, edge-case warnings, prerequisite state, and a validation path. Nothing an agent needs in order to call it correctly or interpret a failure is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must define every parameter — and it does: router and asn with range 1-65535 and the 4-byte caveat, the neighbors object shape with ip/remote_as and the iBGP condition, the CIDR format for networks including the host-bits-zero rule, and dry_run's effect. Nested structure that the schema leaves as a bare object is spelled out explicitly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 ("Configures BGP on a router") and immediately states the mechanism (IOS CLI, each line verified), which distinguishes it from the generic pt_cli sibling. It also names the exact commands it emits, so an agent knows precisely what configuration surface it touches.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is clearly contextualized: use this for BGP configuration, use dry_run to validate first, and use pt_cli("show ip bgp summary") to verify afterwards — an explicit pointer to a sibling for the verification step. It lacks a negative rule (e.g. use pt_cli directly for arbitrary BGP show commands rather than this tool), so it stops short of full when/when-not guidance.

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