Skip to main content
Glama

List firewall policies

list_policies
Read-onlyIdempotent

List firewall policies in FortiOS evaluation order, with exact-match filters on address, service, interface, and enabled status. Paging and counts included.

Instructions

List firewall policies in evaluation order, optionally filtered.

Policies come back in the order FortiOS evaluates them, and each carries an explicit order index so that ordering survives filtering and re-serialization. Order is the entire meaning of a ruleset, and a list position is not something downstream is obliged to preserve.

Three counts appear and they mean different things. count is rows in this page, total_available is rows matching your filters, and total_policies is the size of the whole ruleset. A truncated flag means this is one page of the matches, not all of them, which matters more here than elsewhere: reasoning about a ruleset from an arbitrary prefix of it produces confident wrong answers about what traffic is allowed.

The filters match names exactly and do not expand indirection. A policy referencing a group that contains your address will not match address, and a policy referencing a zone that contains your interface will not match interface. If filtered_out shows a filter removed everything, that is the cue: the object is probably reached through a group or a zone, and find_references answers "what touches this object" properly, walking those containers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vdomNoVirtual domain to read. Defaults to the one configured for this target. The `vdom` field in the response names the one actually read.
limitNoMaximum policies to return. Defaults to 200, capped at 1000.
offsetNoIndex to start from, for paging through a large ruleset.
targetNoWhich FortiGate to query. Optional when only one is configured.
addressNoKeep only policies naming this address object or group directly, on either side.
serviceNoKeep only policies naming this service object directly.
interfaceNoKeep only policies naming this interface directly as a source or destination interface.
enabled_onlyNoDrop policies whose status is disabled.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower, yet the description still discloses non-obvious behavior: the meaning of the three distinct counts, the `truncated` paging flag and why prefix-based reasoning about a ruleset is dangerous, and the fact that filters match names exactly and do not expand indirection.

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 short paragraphs, each front-loaded with its point (ordering, counts, filter semantics, fallback to find_references), and no filler sentences. It is longer than average but every paragraph carries distinct, actionable information, so it stops just short of maximal conciseness.

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?

An output schema exists, so return values need not be explained, yet the description explains the counts and truncation flag that an agent must interpret to avoid confident wrong answers. Combined with filtering caveats and the find_references fallback, nothing needed to call this tool correctly is missing.

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, but the description adds real semantic content the schema lacks: that `address`/`interface`/`service` filters match only direct references and will not match objects reached through a group or zone. That changes how an agent interprets a null result.

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 ('List firewall policies') and immediately adds the decisive scope detail: results come back in FortiOS evaluation order with an explicit `order` index. It is clearly separable from siblings like list_address_objects or find_references.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use context and names the alternative: when `filtered_out` shows the filter removed everything, the object is likely reached through a group or zone and 'find_references answers "what touches this object" properly'. That is a concrete condition plus a named sibling, not inference.

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