Skip to main content
Glama

list_dfw_rules

Read-onlyIdempotent

Retrieve Distributed Firewall rules in a security policy by policy ID. Returns each rule's action, sources, destinations, services, direction, and sequence, with offset pagination.

Instructions

[READ] List rules in a DFW security policy.

Returns the list envelope: 'items' holds each rule's id, display_name, action, sources, destinations, services, direction, disabled flag and sequence number; 'returned'/'limit'/'truncated'/'hint' say whether the page is complete. 'total' is always null here — a full page reports truncated=true and must be paged with offset; one Application policy can hold thousands of rules. Get policy_id from list_dfw_policies; then get_dfw_rule_stats for a rule's hit counts.

Page with 'next_offset': pass the value back as 'offset' and stop when it is null. Do not loop on 'truncated' — that says this page is not the whole collection, which stays true on the last page of a walk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoPage size, 1..1000 (default 50). Not a way to ask for everything — 0 or negative is rejected.
offsetNoRules to skip, 0 or more. Pass the previous response's 'next_offset'.
targetNoOptional NSX Manager target from config.
policy_idYesParent policy identifier.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.10.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / limit / description
      Added value: +"Page size, 1..1000 (default 50). Not a way to ask for everything — 0 or negative is rejected."
    • addedInput schema / properties / offset / description
      Added value: +"Rules to skip, 0 or more. Pass the previous response's 'next_offset'."
    • addedInput schema / properties / policy_id / description
      Added value: +"Parent policy identifier."
    • addedInput schema / properties / target / description
      Added value: +"Optional NSX Manager target from config."
  2. Changed1 schema field changedv1.8.9
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "items": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "title": "Result",
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "list_dfw_rulesOutput",
      -  "type": "object"
      -}New value: +null
  3. Changed2 schema fields changedv1.6.1
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 50,
      +  "title": "Limit",
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "title": "Offset",
      +  "type": "integer"
      +}
  4. Addedv1.5.29
  5. Removedv1.5.28
  6. First observedv1.3.2

TDQS

A4.7/5.0
Behavior5/5

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

The description substantially enriches the annotations by explaining pagination behavior: 'total' is always null, a full page reports truncated=true, offset-based paging is required, and one policy can hold thousands of rules. It also explicitly warns not to loop on 'truncated' and says to stop when 'next_offset' is null, which is valuable behavioral detail beyond the readOnly/openWorld/idempotent hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose and read-only intent, then covers return envelope, pagination semantics, and related sibling tools in a logical order. Despite its length, every sentence adds necessary operational detail, especially around the non-obvious 'truncated' behavior.

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?

For a paginated read-only list tool with no output schema, the description is complete: it explains the return envelope fields, the pagination contract, the policy_id source, the sibling for rule statistics, and the special 'total is always null' behavior. Nothing critical is missing for an agent to call it correctly.

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 four parameters well. The description adds extra meaning by telling the agent where policy_id comes from (list_dfw_policies), reinforcing that offset is fed by 'next_offset', and clarifying the termination rule for pagination. This goes slightly beyond the baseline for high schema coverage.

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 description opens with '[READ] List rules in a DFW security policy', giving a specific verb, resource, and scope. It clearly distinguishes the tool from siblings like list_dfw_policies (lists policies) and get_dfw_rule_stats (rule hit counts), so an agent can select it correctly without inspecting schemas.

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 description gives clear usage context: get the policy_id from list_dfw_policies, then list its rules, and use get_dfw_rule_stats when rule hit counts are needed. It does not explicitly state exclusions for create/update/delete siblings, but the read-only framing and rule-list purpose make the intended use unambiguous.

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