Skip to main content
Glama

get_dfw_rule_stats

Read-onlyIdempotent

Check a Distributed Firewall rule's packet, byte, session, and hit counts to verify if it still matches traffic before updating or deleting it.

Instructions

[READ] Get packet/byte hit-count statistics for a DFW rule.

Returns one flat stats object, not an envelope: packet_count, byte_count, session_count, hit_count, popularity_index. Use it before update_dfw_rule or delete_dfw_rule to see if a rule still matches traffic; counters are cumulative and may read zero on a new rule. Ids come from list_dfw_rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoOptional NSX Manager target from config.
rule_idYesRule identifier.
policy_idYesParent policy identifier.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.10.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / policy_id / description
      Added value: +"Parent policy identifier."
    • addedInput schema / properties / rule_id / description
      Added value: +"Rule identifier."
    • addedInput schema / properties / target / description
      Added value: +"Optional NSX Manager target from config."
  2. Addedv1.5.29
  3. Removedv1.5.28
  4. First observedv1.3.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate a safe read operation, and the description adds meaningful behavioral context beyond that: counters are cumulative, may read zero on a new rule, and the response is a flat stats object rather than an envelope. This helps the agent interpret results correctly.

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?

Three sentences, each earning its place: purpose, return shape, usage context, and ID source. The [READ] prefix and action-oriented opening make the tool's role immediately clear.

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?

Despite having no output schema, the description compensates by listing all returned fields and explaining counter semantics. It also covers where IDs come from and when to call this tool, making it self-sufficient for correct invocation and interpretation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already explains all parameters. The description adds minimal parameter-level meaning beyond noting that IDs come from list_dfw_rules, which is useful but not deeply elaborated. Baseline 3 is appropriate.

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 names a specific verb ('Get') and resource ('packet/byte hit-count statistics for a DFW rule'), and clarifies the return shape by listing the exact fields. This makes it easy to distinguish from sibling tools like get_dfw_policy or get_idps_status.

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?

The description explicitly directs when to use the tool: before update_dfw_rule or delete_dfw_rule to check whether a rule still matches traffic. It also points to list_dfw_rules as the source for identifiers, giving the agent actionable routing guidance.

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