Skip to main content
Glama
mdemirn

FortiGate MCP Server

by mdemirn

create_service_object

Adds a FortiGate service object that defines protocols and ports for firewall policies. Provide device ID, service data, and optional VDOM to create TCP, UDP, or ICMP services.

Instructions

Create a new service object on a FortiGate device.

This tool adds a new network service object that defines protocols and ports for use in firewall policies.

Parameters:

  • device_id: Identifier of the FortiGate device

  • service_data: Service object configuration as JSON

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

Service data should include:

  • name: Service name

  • protocol: TCP, UDP, or ICMP

  • tcp-portrange: TCP port range (for TCP)

  • udp-portrange: UDP port range (for UDP)

  • comment: Optional description

Returns:

  • Creation status

  • Service configuration summary

Input Schema

NameRequiredDescriptionDefault
vdomNoVirtual Domain
device_idYesFortiGate device identifier
service_dataYesService object configuration

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does disclose that this is a write operation and summarizes the return payload (creation status plus configuration summary), but it says nothing about duplicate-name behavior, whether the object is committed immediately, permission requirements, or failure modes.

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 the purpose and the remaining sections are scannable lists. The "Parameters" block partially duplicates the input schema, which is mild waste, but the Returns section earns its space since no output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The enumerated nested fields and the returns summary compensate well for the absent output schema and untyped nested object. However, for an unannotated mutation tool it omits the safety profile (reversibility, error handling) and the preconditions an agent needs before invoking it.

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 baseline is 3, but the description earns a step up by enumerating the nested service_data fields (name, protocol, tcp-portrange, udp-portrange, comment) — the schema declares service_data only as an open object with no field-level detail. It also restates that vdom is optional and falls back to the device default.

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?

The description opens with a specific verb and resource ("Create a new service object on a FortiGate device") and adds scope detail: it defines protocols and ports for use in firewall policies. That distinguishes it implicitly from update_service_object, delete_service_object, and list_service_objects, though those siblings are never named.

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 context is only implied by the phrase "for use in firewall policies." There is no explicit when-to-use guidance, no mention of the update_service_object alternative for modifying existing objects, and no stated prerequisite that the device must already be registered (add_device) or the VDOM must exist.

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