Skip to main content
Glama

create_dfw_rule

Create a new distributed firewall rule in an existing security policy. Define action, sources, destinations, services, and priority to control network traffic.

Instructions

[WRITE] Create a firewall rule under an existing DFW security policy.

Returns the created rule dict (id, path, action, ...), else {"error", "hint"}; a bad action/direction/ip_protocol lists the valid values. PUT semantics: reusing a rule_id overwrites that rule, enforced immediately unless disabled=True. Pick policy_id with list_dfw_policies first; prefer update_dfw_rule to edit one and delete_dfw_rule to remove one.

Args: policy_id: Parent policy id, from list_dfw_policies. rule_id: Unique rule id within that policy. display_name: Human-readable name. action: ALLOW, DROP, REJECT or JUMP_TO_APPLICATION (default ALLOW); JUMP_TO_APPLICATION needs an Environment policy. sources: Source group paths like ['/infra/domains/default/groups/web']; omit for any. destinations: Destination group paths; omit for any. services: Service paths; omit for all. scope: Applied-to group/segment paths; omit for the whole DFW. direction: IN, OUT or IN_OUT (default IN_OUT). ip_protocol: IPV4, IPV6 or IPV4_IPV6 (default IPV4_IPV6). logged: Log matched traffic (default False). disabled: Create the rule unenforced (default False). sequence_number: Priority; lower matches first (default 10). description: Optional free text. target: Target name from config; default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNo
actionNoALLOW
loggedNo
targetNo
rule_idYes
sourcesNo
disabledNo
servicesNo
directionNoIN_OUT
policy_idYes
descriptionNo
ip_protocolNoIPV4_IPV6
destinationsNo
display_nameYes
sequence_numberNo
Behavior5/5

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

Goes well beyond the minimal annotations by disclosing PUT semantics (overwriting on reused rule_id), immediate enforcement unless disabled, return format (rule dict or error/hint), and error behavior for invalid values. No contradiction with annotations.

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?

Long but appropriately sized for 15 parameters; front-loads core behavior and return semantics before structured Args. Every sentence adds value, and the Args block is cleanly formatted.

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?

No output schema and sparse annotations would normally leave gaps, but the description fully covers prerequisites, side effects, error formats, parameter details, and sibling relationships. It is self-contained for correct invocation.

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

Parameters5/5

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

With 0% schema description coverage, the description carries the full burden and succeeds: every parameter is explained with defaults, examples, and special conditions (e.g., source group path format, omit-for-any semantics).

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?

Opens with 'Create a firewall rule under an existing DFW security policy' – a specific verb, resource, and parent context. Clearly distinguishes from siblings like create_dfw_policy, update_dfw_rule, and delete_dfw_rule.

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?

Explicitly states 'Pick policy_id with list_dfw_policies first' and directs users to update_dfw_rule for edits and delete_dfw_rule for removal. Also provides condition for JUMP_TO_APPLICATION requiring an Environment policy.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vmware-skills/VMware-NSX-Security'

If you have feedback or need assistance with the MCP directory API, please join our Discord server