Skip to main content
Glama
mdemirn

FortiGate MCP Server

by mdemirn

create_firewall_policy

Creates a new firewall policy on a FortiGate device to control traffic flow by defining rules for source, destination, interfaces, and services.

Instructions

Create a new firewall policy on a FortiGate device.

This tool adds a new security policy to control traffic flow through the FortiGate device, defining rules for source, destination, and services.

Parameters:

  • device_id: Identifier of the FortiGate device

  • policy_data: Policy configuration as JSON object

  • vdom: Virtual Domain name (optional, uses device default)

Policy data should include:

  • name: Policy name

  • srcintf: Source interface(s)

  • dstintf: Destination interface(s)

  • srcaddr: Source address object(s)

  • dstaddr: Destination address object(s)

  • service: Service object(s)

  • action: accept or deny

Returns:

  • Creation status

  • Policy ID assigned

  • Configuration summary

Input Schema

NameRequiredDescriptionDefault
vdomNoVirtual Domain
device_idYesFortiGate device identifier
policy_dataYesPolicy configuration as JSON

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose useful behavior: vdom falls back to the device default, and the return includes the assigned policy ID and a configuration summary. It does not say whether creation fails on unresolved object references, where the policy lands in the policy order, or what permissions are required for a write operation on FortiGate.

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 one-sentence purpose, then short scoped sections for parameters, policy data, and returns. No filler sentences, though the Parameters block largely restates what the schema already says.

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 3-parameter creation tool with no output schema and an opaque nested object, the description supplies the missing payload shape and the return contents, which is exactly what an agent needs to construct a valid call. Remaining gaps (policy ordering, error conditions) are minor for a create operation.

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 coverage is nominally 100%, but policy_data is a free-form object with additionalProperties:true and only 'Policy configuration as JSON' as its schema text. The description compensates by enumerating the expected inner keys (name, srcintf, dstintf, srcaddr, dstaddr, service, action), which is substantial value beyond the schema. It does not indicate which of those inner fields are required or how lists vs scalars are handled.

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?

Clear specific verb + resource: 'Create a new firewall policy on a FortiGate device', followed by a one-line statement of what that means operationally (rules for source, destination, services). It is distinguishable from siblings like update_firewall_policy or move_firewall_policy by name, but the description never explicitly contrasts with them.

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 (you need a device_id and a policy_data payload with interface/address/service objects) but the description never states when to use this versus update_firewall_policy, nor that referenced address/service objects should exist first via create_address_object/create_service_object. No exclusions or prerequisites are given.

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