Skip to main content
Glama
FortiManager MCP Server

FortiManager MCP Server

by rstierli

get_preview_result

Fetch the staged installation preview result for target devices in an ADOM after the preview task finishes, so configuration changes can be reviewed before committing.

Instructions

Fetch the result of an installation preview.

On FortiManager 7.6.7+ / 8.0.2+ preview_install already returns its result and then discards the staged copy, so re-reading that preview here returns "=== No preview result ===" (measured on 8.0.2); this is for a preview staged elsewhere, e.g. the GUI install wizard. On older builds it is the second half of preview_install: call it once that preview's task has finished (wait_for_task).

Args: adom: ADOM name devices: Target devices [{"name": "FGT1", "vdom": "root"}, ...] preview_taskid: Staging task id of the preview (staging_task_id from preview_install; FMG 7.6.7+ / 8.0.2+ only). Omitted, FortiManager uses its last install task, which may not be the preview you mean. An id with no preview returns "=== No preview result ===".

Returns: dict: Preview results with keys: - status: "success" or "error" - preview: Preview data with configuration changes - message: Error message if failed

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>",
      "devices": "<devices>"
    },
    "name": "get_preview_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
adomYes
devicesYes
preview_taskidNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.13.1
    • addedInput schema / properties / preview_taskid
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Preview Taskid"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the whole burden, and it does: version-dependent behavior, the exact empty-result sentinel returned for a stale or unknown task id, and the non-obvious fallback that omitting preview_taskid makes FortiManager use its last install task, which may not be the intended preview. These are precisely the failure modes an agent would otherwise hit blind.

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 the version caveats, then structured Args/Returns. Every bullet in Args earns its place, but the Returns block restates keys already covered by the output schema, which is some avoidable duplication in an otherwise tight definition.

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 version-sensitive, state-dependent read tool with 3 parameters at 0% schema coverage, the description covers timing, prerequisites, fallback semantics, and error signaling. Combined with the existing output schema, an agent has everything needed to call it correctly.

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 description coverage is 0%, so the description must compensate and largely does: it gives the device entry shape ('[{"name": "FGT1", "vdom": "root"}]') and a thorough explanation of preview_taskid's provenance, omission behavior, and failure result. adom is only glossed as 'ADOM name', leaving one parameter thin, which keeps this just short of 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?

Opens with a specific verb+resource ('Fetch the result of an installation preview') and immediately positions it relative to the sibling preview_install, including which builds make it a second-half call versus a standalone read. An agent can distinguish it from preview_install and wait_for_task without opening any 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?

Gives explicit when-to-use (a preview staged elsewhere, e.g. the GUI install wizard; on older builds after wait_for_task completes), explicit when-not (on 7.6.7+/8.0.2+ re-reading preview_install's own preview returns the empty marker), and names the prerequisite sibling wait_for_task. This is the full when/when-not/alternative triad.

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