Skip to main content
Glama
mdemirn

FortiGate MCP Server

by mdemirn

execute_ipsec_tunnel_action

Bring an IPsec tunnel up or down on a FortiGate device to control site-to-site VPN connectivity; optionally target a specific phase-2 selector.

Instructions

Bring an IPsec tunnel up or down (monitor/vpn/ipsec/tunnel_up | tunnel_down).

Bringing a site-to-site tunnel down interrupts traffic until it renegotiates; requires writes to be enabled.

Parameters:

  • device_id: Identifier of the FortiGate device

  • phase1_name: Phase-1 interface name (see list_ipsec_phase1 / list_ipsec_tunnels)

  • action: "up" or "down"

  • phase2_name: Optional phase-2 selector name (defaults to all selectors of the phase-1)

  • vdom: Virtual Domain name (optional)

Returns:

  • Action status

Input Schema

NameRequiredDescriptionDefault
vdomNoVirtual Domain
actionYesBring the tunnel up or down
device_idYesFortiGate device identifier
phase1_nameYesPhase-1 interface name
phase2_nameNoPhase-2 selector name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the impactful behavior: tunnel-down interrupts site-to-site traffic and requires writes enabled. Minor gaps remain on idempotency, permissions specifics, and what 'Action status' actually contains.

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 impact/warning sentence followed by organized Parameters and Returns sections. Some repetition of schema field descriptions, but overall efficient and scannable.

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 5-param mutation tool with no output schema, the description covers prerequisites, side effects, defaults, and a brief return note. Slightly thin on return detail, but adequate for correct invocation.

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 100%, but the description adds value beyond it: phase2_name defaults to all selectors of the phase-1, action enumerates up/down, and phase1_name is cross-referenced to discovery tools. That extra semantics justifies above baseline.

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 pair (bring up/down) on a specific resource (IPsec tunnel/phase-1) and even names the underlying monitor endpoints. Clearly distinguishable from sibling read tools like list_ipsec_tunnels.

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?

Explains the consequence of down (traffic interruption until renegotiation) and the prerequisite that writes must be enabled, plus points to list_ipsec_phase1 / list_ipsec_tunnels for discovering phase1_name. Lacks an explicit 'when not to use' or alternative-tool exclusion, but context 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