Skip to main content
Glama
ry-ops

fortigate-mcp-server

by ry-ops

create_firewall_policy

Create a FortiGate firewall policy to permit or block traffic between interfaces, with optional NAT, logging, and security profiles.

Instructions

Create a firewall policy. New policies are added at the end of the list; use move_firewall_policy to reorder. FortiGate-VM evaluation licenses allow only 3 policies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
natNoSource NAT to the outgoing interface IP
nameYesPolicy name
vdomNoVDOM (default: FORTIGATE_VDOM, usually root)
extraNoExtra FortiOS attributes merged into the request body as-is (hyphenated keys)
actionNoaccept or deny
statusNoenable or disable
dstaddrYesDestination addresses or groups
dstintfYesDestination interfaces, e.g. [port1]
serviceYesServices, e.g. [HTTP, HTTPS] or [ALL]
srcaddrYesSource addresses or groups, e.g. [LAB-NET] or [all]
srcintfYesSource interfaces, e.g. [port2]
commentsNoComment
policyidNoPolicy ID (optional; FortiOS picks the next free ID)
scheduleNoSchedule (default always)
av_profileNoAntivirus profile ('' to detach)
ips_sensorNoIPS sensor ('' to detach)
logtrafficNoall, utm or disable
utm_statusNoEnable security profiles on the policy. Turned on automatically when a profile is given
ssl_ssh_profileNoSSL/SSH inspection profile: no-inspection, certificate-inspection (hostname/cert visibility, no decryption) or deep-inspection / a custom profile (decrypts; clients must trust the CA)
application_listNoApplication control profile, e.g. default ('' to detach)
webfilter_profileNoWeb filter profile ('' to detach)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.2/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 disclose two non-obvious traits: new policies are appended to the end of the list, and evaluation licenses cap at 3 policies. It omits permissions, error behavior on name collision, and idempotency, but the constraints it does surface are valuable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, each earning its place: purpose, ordering behavior plus alternative, and license constraint. The core action is front-loaded with zero filler.

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 21-parameter mutation tool the schema is fully self-documenting on inputs, and the description adds the key operational caveats (append ordering, license cap). It lacks return-value guidance (no output schema exists, e.g. the resulting policyid) and permission requirements, but is otherwise adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all 21 parameters (including the nested 'extra' object) are already documented in the schema. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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 ("Create a firewall policy") and immediately distinguishes itself from the sibling move_firewall_policy, which handles reordering. An agent can identify this as the creation path 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 Guidelines4/5

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

Explicitly routes reordering to move_firewall_policy and warns about the 3-policy cap on FortiGate-VM evaluation licenses, which are genuine when-to-use signals. It stops short of stating prerequisites (required VDOM, permissions) or when not to create, so it is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.