Skip to main content
Glama
ry-ops

fortigate-mcp-server

by ry-ops

create_port_forward

Create a port forward (VIP) to redirect external traffic to an internal IP and port, and attach it to an existing policy to avoid policy limits.

Instructions

Create a port forward (VIP): traffic arriving on extintf at extip:extport goes to mappedip:mappedport. A VIP only passes traffic once a policy from extintf uses it as a destination. With attach_to_policy, the VIP is added to that existing policy's destinations instead of needing a new policy (the evaluation license allows only 3). FortiOS does not allow VIPs and ordinary addresses in the same policy's destinations, so the target must already use only VIPs, or pass replace_destinations=true to turn it into a VIP-only policy (its old destinations stop being reachable through it). In that policy, services match the mapped (internal) port.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesVIP name, e.g. VIP-TRAEFIK-HTTPS
vdomNoVDOM (default: FORTIGATE_VDOM, usually root)
extipNoExternal IP (default 0.0.0.0 = the extintf's own address)
extraNoExtra FortiOS attributes merged into the request body as-is (hyphenated keys)
commentNoComment
extintfYesInterface the traffic arrives on, e.g. port1
extportYesExternal port or range, e.g. 8443
mappedipYesInternal IP or range a-b, e.g. 192.168.150.10 or 192.168.150.10-192.168.150.12
protocolNotcp (default), udp or sctp
mappedportNoInternal port or range (default: same as extport)
attach_to_policyNoAdd this VIP to an existing policy's destinations (recommended)
replace_destinationsNoWith attach_to_policy: replace the policy's ordinary-address destinations with this VIP

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.3/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 the license constraint, the VIP-only-vs-ordinary-address restriction, and the destructive side effect that replace_destinations makes old destinations unreachable. It omits auth/permission requirements and error/idempotency behavior, so it is not complete.

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?

Four dense sentences, front-loaded with the core mapping and with no filler; each sentence contributes required context. Scannability suffers slightly from parentheticals and semicolons, but nothing 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 12-parameter, nested, no-annotation mutation tool, the description covers the behavioral and workflow context an agent needs to call it correctly. It does not describe the response shape, and there is no output schema to compensate, leaving a minor gap.

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 100%, so the schema already documents all 12 parameters (baseline 3). The description adds genuine meaning beyond the schema for the two most consequential params: the purpose of attach_to_policy and the destructive consequence of replace_destinations, plus the note that services match the mapped internal port.

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?

The first sentence states a specific verb (Create) and resource (port forward / VIP) and immediately defines the traffic mapping semantics. It clearly distinguishes this from list_port_forwards/delete_port_forward and from create_firewall_policy by describing the VIP-plus-policy relationship.

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?

It gives strong conditional guidance: use attach_to_policy to reuse an existing policy because the eval license allows only 3, and pass replace_destinations=true only when the target policy already uses only VIPs. It stops short of explicitly naming the alternative tool (create_firewall_policy) for the new-policy path.

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