Skip to main content
Glama
FortiManager MCP Server

FortiManager MCP Server

by rstierli

update_firewall_policy

Modify specified fields of an existing firewall policy while preserving all unchanged settings.

Instructions

Update an existing firewall policy.

Only the specified fields will be updated; other fields remain unchanged.

Args: adom: ADOM name package: Policy package name policyid: Policy ID to update name: New policy name (optional) srcintf: New source interfaces (optional) dstintf: New destination interfaces (optional) srcaddr: New source addresses (optional) dstaddr: New destination addresses (optional) service: New services (optional) action: New action - "accept" or "deny" (optional) schedule: New schedule (optional) nat: Enable/disable NAT (optional) logtraffic: New log mode (optional) status: New status (optional) comments: New comments (optional) global_label: Policy section label (optional) global_label_color: Policy section color ID 0-31 (optional) srcaddr_negate: Match all sources EXCEPT srcaddr (optional; None leaves the field untouched, like every other optional field) dstaddr_negate: Match all destinations EXCEPT dstaddr (optional) service_negate: Match all services EXCEPT service (optional) utm_status: Enable/disable security profile inspection (optional) av_profile: Antivirus profile name (optional) ips_sensor: IPS sensor name (optional) webfilter_profile: Web filter profile name (optional) dnsfilter_profile: DNS filter profile name (optional) application_list: Application control list name (optional) file_filter_profile: File filter profile name (optional) ssl_ssh_profile: SSL/SSH inspection profile name (optional) profile_protocol_options: Protocol options profile name (optional). Mutually exclusive with profile_group in the same call -- it is itself a member of the FortiOS firewall profile-group object profile_group: Security profile group name (optional). Mutually exclusive with av_profile, ips_sensor, webfilter_profile, dnsfilter_profile, application_list, file_filter_profile, ssl_ssh_profile, and profile_protocol_options in the same call install_on: Replace the policy's install-on targets (optional): devices {"name": "branch1", "vdom": "root"} and/or device groups {"name": "emea_spokes"}. An empty list clears them, so the policy installs on every device the package goes to

Note: Sending any individual security-profile field (av_profile, ssl_ssh_profile, profile_protocol_options, etc.) on a policy that is currently in group mode flips profile-type to "single" on the appliance. The previously-stored profile-group value becomes dormant (not deleted) rather than staying active alongside the new field -- FortiOS only honors one profile-type at a time.

Returns: dict: Update result with keys: - status: "success" or "error" - policyid: Updated policy ID - message: Status or error message

Example: >>> # Disable a policy >>> result = await update_firewall_policy( ... adom="root", ... package="default", ... policyid=10, ... status="disable" ... )

>>> # Update source addresses
>>> result = await update_firewall_policy(
...     adom="root",
...     package="default",
...     policyid=10,
...     srcaddr=["New-Subnet", "Other-Subnet"]
... )

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>",
      "policyid": "<policyid>"
    },
    "name": "update_firewall_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
natNo
adomYes
nameNo
actionNo
statusNo
dstaddrNo
dstintfNo
packageYes
serviceNo
srcaddrNo
srcintfNo
commentsNo
policyidYes
scheduleNo
av_profileNo
install_onNo
ips_sensorNo
logtrafficNo
utm_statusNo
global_labelNo
profile_groupNo
dstaddr_negateNo
service_negateNo
srcaddr_negateNo
ssl_ssh_profileNo
application_listNo
dnsfilter_profileNo
webfilter_profileNo
global_label_colorNo
file_filter_profileNo
profile_protocol_optionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.13.1
    • addedInput schema / properties / install_on
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Install On"
      +}
  2. Changed13 schema fields changedv1.12.0
    • addedInput schema / properties / application_list
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Application List"
      +}
    • addedInput schema / properties / av_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Av Profile"
      +}
    • addedInput schema / properties / dnsfilter_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Dnsfilter Profile"
      +}
    • addedInput schema / properties / dstaddr_negate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Dstaddr Negate"
      +}
    • addedInput schema / properties / file_filter_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "File Filter Profile"
      +}
    • addedInput schema / properties / ips_sensor
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Ips Sensor"
      +}
    • addedInput schema / properties / profile_group
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Profile Group"
      +}
    • addedInput schema / properties / profile_protocol_options
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Profile Protocol Options"
      +}
    • addedInput schema / properties / service_negate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Service Negate"
      +}
    • addedInput schema / properties / srcaddr_negate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Srcaddr Negate"
      +}
    • addedInput schema / properties / ssl_ssh_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Ssl Ssh Profile"
      +}
    • addedInput schema / properties / utm_status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Utm Status"
      +}
    • addedInput schema / properties / webfilter_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Webfilter Profile"
      +}
  3. First observed

TDQS

A4/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 well: it discloses non-obvious appliance behavior — that sending any individual profile field flips profile-type to "single" and leaves the stored profile-group dormant, that install_on with an empty list clears targets, and which profile fields are mutually exclusive. It stops short of error/permission behavior (what happens on an unknown policyid, required privileges) and does not state whether changes are reversible.

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?

It is long, but the length is proportionate to 31 parameters, and the operation-defining sentences plus the profile-type warning are front-loaded before the per-argument list. Two minor indulgences: the Returns block restates a return value already covered by the output schema, and the parenthetical "like every other optional field" is redundant.

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 31-parameter mutation tool with no annotations, this is close to complete — it covers partial-update semantics, field interactions, and the highest-risk side effect. Remaining gaps are error/validation behavior and scope of adom/package, which matter for an agent recovering from a failed call.

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% across 31 parameters, and the description compensates fully: every argument is glossed, action is constrained to "accept"/"deny", global_label_color to 0-31, the three *_negate flags are explained as "match all ... EXCEPT", and install_on is given concrete object shapes. The mutual-exclusion rules between profile_group and the individual profile fields are exactly the kind of constraint a bare schema cannot express.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Update an existing firewall policy" gives a specific verb and resource, and the partial-update statement ("Only the specified fields will be updated; other fields remain unchanged") clarifies semantics versus create/delete. It does not name siblings such as move_firewall_policy or revert_firewall_policy, so an agent must infer that repositioning or reverting belongs elsewhere.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the agent learns this is a partial-mutation on an existing policy, which rules out create/delete by contrast. There is no explicit when-to-use/when-not, no guidance on choosing between this and move/revert, and no prerequisite (e.g., that the policyid must already exist) called 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