Skip to main content
Glama

delete_dfw_rule

Destructive

Preview or permanently delete a single NSX Distributed Firewall rule from its parent security policy, showing the blast radius before any change is applied.

Instructions

[WRITE] Permanently delete one DFW rule from its parent security policy.

Irreversible and immediate: traffic it matched falls through to lower-priority rules or the policy default. Without confirm=True this only previews: it returns blast_radius (the parent policy, the rule's action, sources, destinations, services, scope, direction, disabled flag, blockers, unmeasured) and deletes nothing. Show that to the user and get their decision. Do not set confirm=True on your own because the user asked to delete earlier: they have not seen the blast radius yet. Check recent hits with get_dfw_rule_stats first; prefer update_dfw_rule with disabled=True when you may need the rule back. A rule_id not in the policy is an error, and confirm=True refuses when the rules could not be read. To remove a whole policy use delete_dfw_policy — it refuses while rules remain. Returns {"action": "preview" | "deleted", "blast_radius": ...}, else {"error", "hint", "blast_radius"?}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoTarget name from config; default if omitted.
confirmNoFalse (default) returns the blast radius and changes nothing. True applies it.
rule_idYesRule id within that policy, from list_dfw_rules.
policy_idYesParent policy id, from list_dfw_policies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.13.0
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "description": "False (default) returns the blast radius and changes nothing. True applies it.",
      +  "title": "Confirm",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv1.10.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / policy_id / description
      Added value: +"Parent policy id, from list_dfw_policies."
    • addedInput schema / properties / rule_id / description
      Added value: +"Rule id within that policy, from list_dfw_rules."
    • addedInput schema / properties / target / description
      Added value: +"Target name from config; default if omitted."
  3. Addedv1.5.29
  4. Removedv1.5.28
  5. First observedv1.3.2

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations' destructiveHint, the description discloses irreversibility, immediate fallthrough behavior, preview mode, refusal conditions, and error semantics. It also states exactly what the blast_radius contains and what the return shape is, giving the agent a clear model of side effects.

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 dense but every sentence earns its place: it front-loads the destructive nature, then explains preview mode, user consent, alternatives, error cases, and return format. No redundant or filler language is present despite the length being justified by the tool's risk.

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?

Given this is a destructive write operation with no output schema, the description is remarkably complete: it covers the preview/deletion return values, error shape, blast radius fields, prerequisites, alternative tools, and safety workflow. An agent has everything needed to invoke 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?

The input schema already covers all four parameters with 100% description coverage, so the baseline is satisfied. The description adds value by explaining the confirm=False preview contract, the requirement to show blast_radius before confirming, and the error condition when rule_id is not in the policy, which goes slightly beyond the schema.

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 a specific verb and resource: 'Permanently delete one DFW rule from its parent security policy.' It clearly distinguishes this tool from siblings like update_dfw_rule, delete_dfw_policy, and list_dfw_rules by naming the precise destructive action and scope.

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 gives explicit when-to-use and when-not-to-use guidance: check hits with get_dfw_rule_stats first, prefer update_dfw_rule with disabled=True if the rule may be needed back, and use delete_dfw_policy for whole-policy removal. It even instructs the agent not to auto-confirm deletion before showing the blast radius, which is strong operational guidance.

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