Skip to main content
Glama
FortiManager MCP Server

FortiManager MCP Server

by rstierli

clone_package

Clone a FortiManager policy package with its policies and wait for completion, creating an unassigned copy by default for safe editing; optionally copy device assignments.

Instructions

Clone a policy package.

Creates a copy of an existing package with all its policies and waits for FortiManager's clone task to finish.

Changed in 1.13.0: by default the clone is NOT assigned to any device (earlier releases asked FMG to keep the source's assignment), so it can be edited and reviewed without touching the devices that run the source package. Pass copy_installation_targets=True for the old behaviour. Each policy keeps its own "install on" targets either way: FMG clears them on an unassigned clone, so they are copied back from the source.

The new name is sent as dst_name, the parameter FNDN documents for /securityconsole/package/clone (7.2 through 8.0); earlier releases sent new_name, which is not a parameter of that command. The clone is created at the package root, so new_name is a plain name, not a folder path.

Args: adom: ADOM name package: Source package name (may be folder-qualified) new_name: Name for the cloned package, without a folder copy_installation_targets: Also copy the source package's device and group assignment (default: False) timeout: Seconds to wait for the clone task (10-600, default 120)

Returns: dict: Clone result with keys: - status: "success" or "error" - package: New package name - task_id: FMG clone task - installation_targets_copied: Whether the assignment was copied - policy_targets_restored: IDs of policies whose install-on targets were copied back from the source - warnings: Policies whose targets could not be restored - message: Status or error message

Example: >>> result = await clone_package( ... adom="root", ... package="default", ... new_name="default-copy" ... )

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>",
      "package": "<package>",
      "new_name": "<new_name>"
    },
    "name": "clone_package"
  }
}

Input Schema

NameRequiredDescriptionDefault
adomYes
packageYes
timeoutNo
new_nameYes
copy_installation_targetsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.13.1
    • addedInput schema / properties / copy_installation_targets
      Added value: +{
      +  "default": false,
      +  "title": "Copy Installation Targets",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / timeout
      Added value: +{
      +  "default": 120,
      +  "title": "Timeout",
      +  "type": "integer"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/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 the call blocks until the FMG clone task finishes, that the clone is unassigned by default, that FMG clears per-policy install-on targets and they are copied back from the source, and that unrecoverable targets surface as warnings. It also documents the API-level detail that dst_name is the FNDN-documented parameter and the clone lands at the package root.

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?

Purpose and the important default behavior are front-loaded, and the Args/Returns/Example structure is easy to scan. The changelog-style paragraph about 1.13.0 and the FNDN parameter naming is longer than an agent strictly needs, and the Returns block partly repeats the output schema.

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 five-parameter mutation with no annotations, the definition covers default semantics, task-waiting behavior, target restoration side effects, and parameter constraints. Return values are already described by the output schema, so no meaningful gap remains.

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 five parameters is explained in an Args block, including that package may be folder-qualified while new_name must not be, the copy_installation_targets default and meaning, and the timeout range of 10-600 with a default of 120.

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 ('Clone a policy package') and immediately specifies that it copies all policies and blocks on FortiManager's clone task. This clearly separates it from create_package, assign_package, and get_package among the siblings.

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 default behavior and when to override it: use the default so the clone can be edited and reviewed without touching devices, or pass copy_installation_targets=True for the pre-1.13.0 behavior. It does not explicitly name a sibling alternative such as create_package, but the when-to-use 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