Skip to main content
Glama
mdemirn

FortiGate MCP Server

by mdemirn

list_active_sessions

Query live FortiGate session tables with optional source, destination, port, or policy filters to verify traffic flow and identify the matching policy.

Instructions

Query the live session table with optional filters.

Use it to check whether a host's traffic is actually flowing and which policy it matched.

Parameters:

  • device_id: Identifier of the FortiGate device

  • source_ip: Optional source IPv4 address

  • destination_ip: Optional destination IPv4 address

  • destination_port: Optional destination port

  • policy_id: Optional policy ID

  • count: Maximum sessions to return (default 50, max 500)

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per session: protocol, source, destination, policy, duration, bytes, NAT

Input Schema

NameRequiredDescriptionDefault
vdomNoVirtual Domain
countNoMaximum sessions to return
device_idYesFortiGate device identifier
policy_idNoPolicy ID filter
source_ipNoSource IPv4 filter
destination_ipNoDestination IPv4 filter
destination_portNoDestination port filter

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose a valuable behavioral trait beyond the schema: the result cap (default 50, max 500) and the per-session return shape. It never explicitly states that the call is read-only, whether it queries the device live (latency impact on a firewall), or what permissions are required, which are notable gaps for a zero-annotation tool.

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?

Purpose is front-loaded, then parameters, then return shape — a clean structure. The parameter bullets largely restate the schema, which is mild redundancy, but each block is short and scannable.

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?

With no output schema, the description compensates by listing returned fields (protocol, source, destination, policy, duration, bytes, NAT), and it covers all seven parameters plus the required device_id. What's missing is behavioral context around live-query cost/permissions, but the call can be made correctly from this text.

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 description coverage is 100%, so the baseline is 3; the description earns an extra point by adding the count maximum (500) that the schema omits and by grouping the filters into a readable list. It doesn't clarify filter interaction (AND semantics) or whether policy_id/vdom accept names vs. IDs beyond what the schema says.

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?

States a specific verb+resource ('Query the live session table') and adds the operational intent ('check whether a host's traffic is actually flowing and which policy it matched'). It doesn't name the nearest siblings (query_traffic_log, list_firewall_auth_sessions, list_ssl_vpn_sessions), so an agent must infer the boundary, which keeps it from a 5.

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 second sentence gives a concrete use case: verifying live traffic flow and policy match for a host. That is a clear 'when to use' context, though there are no explicit exclusions or pointers to the alternative tools for historical vs. auth sessions.

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