Skip to main content
Glama
rstierli

FortiManager MCP Server

by rstierli

upgrade_device_firmware

Triggers an asynchronous firmware upgrade on a managed FortiManager device, returning a task ID to monitor the reboot and upgrade progress.

Instructions

Trigger a firmware upgrade on a managed device.

Device-affecting: this reboots the device onto the new firmware. Asynchronous -- FortiManager runs the upgrade as a background task (create_task="enable" is always sent) and this returns immediately with a task_id. Poll it with get_task/wait_for_task rather than assuming success from this call's return.

Strongly recommended to call get_firmware_upgrade_path first: FMG may need to step the device through intermediate versions to reach the target, and this tool upgrades straight to target_version without walking that path itself.

Safety: governed by FMG_FIRMWARE_SAFETY (default "strict"), same pattern as trigger_fmg_restore -- refused unless confirm=True is also passed. A firmware upgrade reboots a real managed device onto new code; there is no dry-run and no content to screen, so the gate is a plain explicit confirmation. This is unrelated to spawn_guarded below, which only bounds concurrency, not whether the call is allowed to happen at all. Set FMG_FIRMWARE_SAFETY=disabled to remove the gate.

Args: device: Managed device name target_version: Target firmware version, e.g. "7.2.9-b1688" adom: ADOM name (default: from DEFAULT_ADOM env var, or "root") vdom: VDOM to scope the request to (optional) flags: One upgrade flag (optional): "f_boot_alt_partition" (boot from alternate partition after upgrade), "f_skip_retrieve" (don't retrieve device config after upgrade), "f_skip_multi_steps" (skip the multi-step upgrade process), "f_skip_fortiguard_img" (let the device download firmware from FortiGuard itself) schedule_time: Schedule the upgrade for a future time instead of running it immediately (optional; FMG-native time format) confirm: Must be True to proceed under FMG_FIRMWARE_SAFETY=strict (default). Ignored when FMG_FIRMWARE_SAFETY=disabled.

Returns: dict: Trigger result with keys: - status: "success" or "error" - task_id: Task ID for monitoring (if successful) - message: Status or error message

Example: >>> path = await get_firmware_upgrade_path("FGT-HQ", "7.2.9-b1688") >>> result = await upgrade_device_firmware( ... "FGT-HQ", "7.2.9-b1688", confirm=True ... ) >>> if result["status"] == "success": ... await wait_for_task(result["task_id"], timeout=1800)

Input Schema

NameRequiredDescriptionDefault
adomNo
vdomNo
flagsNo
deviceYes
confirmNo
schedule_timeNo
target_versionYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it discloses that the device reboots onto new code, that the operation is asynchronous background work returning a task_id, that there is no dry-run, and that an environment-variable safety gate refuses calls without confirm=True. It even disambiguates its gate from a concurrency limiter.

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 critical facts (device reboot, async task_id, confirm gate) are front-loaded in the first paragraphs, and the Args/Returns/Example blocks are well-structured. It is longer than strictly necessary — the spawn_guarded aside and the Returns block partially duplicate information available elsewhere.

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 destructive, asynchronous, gated operation with seven undocumented-in-schema parameters, the description supplies everything needed: safety gate, async polling, version-path caveat, flag meanings, and an end-to-end example. The output schema and the inline Returns block together leave no ambiguity.

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%, and the Args section compensates fully: every one of the seven parameters is documented, including the four enumerated values of flags with their meanings, the adom default resolution chain, the schedule_time format source, and the exact confirm gate behavior. This is meaningfully more than the bare types in the schema.

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 ('Trigger a firmware upgrade on a managed device') and immediately distinguishes itself from siblings by naming get_firmware_upgrade_path, trigger_fmg_restore, and get_task/wait_for_task. An agent can identify the tool and its role without opening the schema.

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?

Explicit sequencing guidance is given: call get_firmware_upgrade_path first because this tool does not walk intermediate versions, poll with get_task/wait_for_task instead of trusting the return, and pass confirm=True under the default safety mode. Alternatives and prerequisites are named rather than implied.

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