Skip to main content
Glama
rstierli

FortiManager MCP Server

by rstierli

create_device_ipsec_phase1_interface

Create an IPsec phase1-interface remote gateway in a managed device's database to configure a route-based VPN tunnel, specifying the local interface, gateway type, PSK, and IKE settings.

Instructions

Create an IPsec phase1-interface (remote gateway / IKE SA) in a device's device DB.

Route-based (interface-mode) tunnel only -- this always writes an interface (the outgoing local interface), matching the phase1-interface table this tool targets rather than the legacy policy-based phase1 table.

Args: device: Managed device name name: New phase1-interface (remote gateway) name interface: Local physical/aggregate/loopback/VLAN outgoing interface type: Remote gateway type: "static", "dynamic" or "ddns"; default "static" remote_gw: Remote gateway's external IPv4 address. Required when type is "static" -- a static gateway with no address cannot connect psksecret: Pre-shared key for PSK authentication, 6-128 characters ike_version: IKE protocol version, "1" or "2" mode: IKEv1 ID protection mode: "main" or "aggressive" (ignored on IKEv2) peertype: Peer ID acceptance: "any", "one", "dialup", "peer" or "peergrp". Defaults to "any" when type is "static" and no value is given -- live-verified against FMG 7.6.7: a static PSK gateway created without peertype is rejected with "peer invalid value", so this tool supplies the working default rather than surfacing that error to the caller proposal: Phase1 encryption/authentication proposal list (e.g. ["aes256-sha256"]). Values are passed through to FortiManager largely unvalidated -- see module docstring dhgrp: Phase1 Diffie-Hellman group list (e.g. ["14", "21"]). Same pass-through as proposal nattraversal: NAT traversal: "disable", "enable" or "forced" dpd: Dead Peer Detection mode: "disable", "on-idle" or "on-demand" keylife: Phase1 key life in seconds comments: Free-text comment vdom: VDOM the gateway lives in (default "root")

Returns: Creation result with any echoed credential stripped

Input Schema

NameRequiredDescriptionDefault
dpdNo
modeNo
nameYes
typeNostatic
vdomNoroot
dhgrpNo
deviceYes
keylifeNo
commentsNo
peertypeNo
proposalNo
interfaceYes
psksecretNo
remote_gwNo
ike_versionNo
nattraversalNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the load and does so well: it discloses that this is a write into the device DB, that the peertype default is a live-verified workaround for an FMG 7.6.7 'peer invalid value' rejection, that proposal/dhgrp are passed through largely unvalidated, and that echoed credentials are stripped from the result. It does not mention ADOM locking or that a commit/install is required for the change to take effect.

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?

The opening sentence front-loads purpose and scope before the argument list, and the Args block is scannable with no filler entries. The peertype paragraph is longer than strictly needed and could be compressed, but the extra length buys real behavioral information rather than repetition.

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 16-parameter mutation tool with zero schema descriptions, the description supplies the enum values, defaults, conditional requirements and validation caveats an agent needs to construct a valid call. Return values need not be explained since an output schema exists. The missing piece is lifecycle context — ADOM lock/commit expectations after creating the object.

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 coverage is 0%, yet the description documents essentially every one of the 16 parameters: enumerations for type, ike_version, mode, peertype, nattraversal, dpd; the 6-128 character constraint on psksecret; the conditional requirement that remote_gw be set when type is static; and the note that mode is ignored on IKEv2. This more than compensates for the empty schema descriptions.

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 an IPsec phase1-interface (remote gateway / IKE SA) in a device's device DB') and explicitly disambiguates from the legacy policy-based 'phase1' table, which is exactly the confusion an agent would have. It also situates the object relative to the sibling phase2-interface tools.

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?

The scope constraint 'Route-based (interface-mode) tunnel only' tells the agent when this tool is the right choice versus the legacy policy-based path, and the 'interface' arg is defined as the outgoing local interface. There is no explicit pointer to follow-up calls (e.g. creating the phase2 child or committing the ADOM), so it stops just short of full when/how guidance.

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