Skip to main content
Glama
mdemirn

FortiGate MCP Server

by mdemirn

execute_monitor_action

Executes FortiGate monitor actions like bringing IPsec tunnels up or down, closing sessions, flushing cache, or deauthenticating users; device state changes require writes enabled.

Instructions

Run a monitor action (POST /api/v2/monitor/{path}): tunnel up/down, session close, cache flush, user deauthentication, etc.

Examples: path "vpn/ipsec/tunnel_down" data {"p1name": "branch-vpn"}; path "firewall/session/close" data {"saddr": "10.0.0.5", "daddr": "...", "sport": 1, "dport": 443, "pro": "tcp"}; path "user/firewall/deauth" data {"user": "alice", "ip": "10.0.0.5"}. These change device state and require writes to be enabled.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: monitor action path

  • data: Optional JSON body

  • vdom: Virtual Domain name (optional)

Returns:

  • The raw JSON response

Input Schema

NameRequiredDescriptionDefault
dataNoJSON body
pathYesmonitor action path, e.g. vpn/ipsec/tunnel_down
vdomNoVirtual Domain
device_idYesFortiGate device identifier

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 provided, the description carries the full burden and does disclose the essential traits: this is a POST, it mutates device state, and it requires write access to be enabled. It also states the return is raw JSON. It stops short of noting reversibility, failure modes, or whether actions can be disruptive to live traffic (e.g., deauth), so a 4 rather than 5.

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-loads the operation and endpoint, then examples, then a short parameter list and return note. The trailing parameter bullet list largely duplicates the schema descriptions and could be dropped, but the description remains compact 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 mutation tool with no annotations and no output schema, the definition covers the write prerequisite, the raw-JSON return, and concrete invocation patterns, which is enough to call it correctly. It lacks any note on error responses or side effects of specific actions, leaving a small gap.

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%, so baseline is 3; the description earns above baseline by illustrating what `path` and `data` actually look like in three worked examples, which is genuinely helpful for a free-form path/body API. `device_id` and `vdom` are only restated from the schema, so this isn't a 5.

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 ("Run a monitor action") plus the underlying endpoint POST /api/v2/monitor/{path}, and enumerates the concrete action classes (tunnel up/down, session close, cache flush, deauth). This clearly distinguishes it from read-only siblings like monitor_get and from the narrower execute_ipsec_tunnel_action.

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?

Gives concrete when-to-use examples with exact paths and payload shapes, plus the crucial prerequisite that writes must be enabled on the device. It does not, however, explicitly route the agent away from overlapping siblings such as execute_ipsec_tunnel_action or monitor_get, which is the only missing piece for a 5.

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