Skip to main content
Glama
rstierli

FortiManager MCP Server

by rstierli

trigger_fmg_restore

Restore FortiManager's entire configuration from a remote FTP, SCP, SFTP, or TFTP backup file; requires explicit confirmation and interrupts FMG service during restore.

Instructions

Restore the FortiManager system from a backup on a remote server.

Restores the FortiManager's own configuration from a backup file previously uploaded to an external FTP/SCP/SFTP/TFTP server (see trigger_fmg_backup). This is a disruptive, FortiManager-itself operation -- it does not touch any managed device, but it does REPLACE FMG's ENTIRE configuration and will interrupt the FMG service.

Safety: governed by FMG_RESTORE_SAFETY (default "strict"). Under strict, this call is refused unless confirm=True is also passed -- unlike install_package (gated by a verified preview) or firewall policy writes (gated by content screening), there is no dry-run or content check possible for a restore, so the gate is a plain explicit confirmation instead. Set FMG_RESTORE_SAFETY=disabled to remove the gate entirely.

Args: service: Transfer protocol - "ftp", "scp", "sftp", or "tftp" server: Remote server hostname or IP address filename: Path and file name of the backup on the remote server username: Login username for the remote server (optional) userpasswd: Login password for the remote server (optional) port: Remote server port (optional; protocol default used if unset) passwd: Password to decrypt the backup file, if it was encrypted (optional) confirm: Must be True to proceed under FMG_RESTORE_SAFETY=strict (default). Ignored when FMG_RESTORE_SAFETY=disabled.

Returns: dict: Restore result with keys: - status: "success" or "error" - message: Status or error message

Example: >>> result = await trigger_fmg_restore( ... service="ftp", ... server="10.210.35.207", ... filename="tmp/fmg_backup.dat", ... username="tiger", ... userpasswd="fortinet", ... confirm=True, ... )

Input Schema

NameRequiredDescriptionDefault
portNo
passwdNo
serverYes
confirmNo
serviceYes
filenameYes
usernameNo
userpasswdNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.7/5.0
Behavior4/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 so well: it discloses that this REPLACES FMG's entire configuration, interrupts the FMG service, and is gated by the FMG_RESTORE_SAFETY environment variable with strict-by-default behavior. It does not mention expected downtime, duration, or whether an automatic pre-restore config snapshot exists, which are the remaining behavioral facts an agent would want before invoking an irreversible operation.

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 one-line purpose, then destructive impact, then the safety gate, then per-parameter detail — a sensible ordering. The Args block is long but earns its place given zero schema coverage; the Returns block is somewhat redundant with the output schema, and the example is optional padding.

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 an 8-parameter, destructive, environment-gated operation with no annotations, the description supplies purpose, blast radius, gating semantics, all parameter meanings, and a usage example. The output schema already covers return shape, so nothing essential 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 compensate, and it does: every one of the 8 parameters is documented with meaning beyond its title, including the enumerated protocol values for service, the path semantics of filename, the protocol-default behavior of port, and critically the distinction between userpasswd (remote login) and passwd (backup decryption password) — a distinction the schema alone cannot convey.

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 ('Restore') and a specific resource (FortiManager's own configuration from a remote backup file), and explicitly delimits scope: it does not touch managed devices, unlike other device-oriented siblings. It also cross-references trigger_fmg_backup as the counterpart operation, so an agent can tell the two apart immediately.

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

Usage Guidelines5/5

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

Gives explicit preconditions (backup previously uploaded to FTP/SCP/SFTP/TFTP, see trigger_fmg_backup) and explicitly contrasts its safety model with named alternatives (install_package uses a verified preview, firewall policy writes use content screening) to explain why this one needs a plain confirm flag. The when/when-not logic is fully spelled out.

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