Skip to main content
Glama
FortiManager MCP Server

FortiManager MCP Server

by rstierli

get_bgp_template

Retrieve the router BGP configuration from a BGP provisioning template by ADOM and template name, including AS, router ID, neighbors, and networks for review or troubleshooting.

Instructions

Get the router bgp configuration inside a BGP provisioning template.

get_template returns only a template's metadata. This reads the BGP body a router_bgp template pushes -- AS, router-id, neighbors, neighbor-groups, neighbor-ranges and networks -- e.g. the templates an SD-WAN Overlay Template generates for its hub and branches. Values may be $(variable) placeholders resolved per device at install.

The template body path is not in the bundled FNDN specs; it is verified live on FortiManager 8.0.2 (see get_bgp_template_config in the client for the details and the 7.x fallback).

Args: adom: ADOM name name: BGP template name (list_templates entries whose template setting.stype is router_bgp)

Returns: dict with keys: - adom, name - bgp: raw router/bgp config object (neighbor password stripped -- see _BGP_SECRET_FIELDS) - 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": {
      "adom": "<adom>",
      "name": "<name>"
    },
    "name": "get_bgp_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
adomYes
nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.13.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does well: it warns that values may be $(variable) placeholders resolved per device, that the neighbor password field is stripped from the returned body, that the path is not in bundled FNDN specs, and that verification was done against FortiManager 8.0.2 with a 7.x fallback. These are exactly the behavioral caveats an agent would otherwise miss.

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 core statement, then progressively adds differentiation, an example, and caveats. A few internal references ('see get_bgp_template_config in the client', '_BGP_SECRET_FIELDS') leak implementation detail an agent cannot act on, but the bulk of the length is earned.

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?

Despite an output schema existing, the description still names the returned keys (adom, name, bgp, summary, error/error_code) and flags the stripped password, which the schema alone cannot convey. Combined with the version caveat and parameter guidance, nothing needed to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate: it explains that name is a BGP template name discoverable via list_templates filtered on template setting.stype == router_bgp, which is meaningful beyond a bare 'Name' title. adom is only restated as 'ADOM name', the one parameter left thin.

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?

States a specific verb and resource ('Get the router bgp configuration inside a BGP provisioning template') and explicitly separates it from the sibling get_template, which 'returns only a template's metadata'. The enumerated content (AS, router-id, neighbors, groups, ranges, networks) makes the scope concrete.

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?

It clearly positions the tool against get_template ('this reads the BGP body a router_bgp template pushes') and gives the selection criterion for the name parameter (list_templates entries with template setting.stype of router_bgp). No explicit exclusion for device-level BGP siblings is stated, but the provisioning-template vs. other-tool distinction is clear.

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