Skip to main content
Glama
gen0sec

Gen0Sec WAF Rule MCP Server

Official
by gen0sec

Validate a rule expression (WAF or Smart Firewall)

validate_waf_expression

Validates Wirefilter rule expressions for WAF or Smart Firewall schemes, optionally testing against custom data, and returns validity status with error messages.

Instructions

Validate a Wirefilter rule expression. rule_type selects the scheme: 'waf' (HTTP L7 fields, default) or 'smart_firewall' (L3/L4 + JA4 fields; http.* fields are NOT available and will be rejected). Optionally test against custom test data. Returns a dictionary with valid (boolean) and error_message (string) when invalid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testNo
rule_typeNowaf
expressionYes
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses return format (dictionary with valid boolean and error_message string) and constraint that http.* fields are rejected for smart_firewall. Lacks mention of side effects or authorization, but none likely.

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?

Two efficient sentences. All information is relevant and front-loaded with purpose. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and low schema coverage, the description provides essential details: purpose, rule_type options, return format. However, it omits details about the test parameter structure and success return (only mentions error_message for invalid). Adequate but has gaps.

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 description coverage is 0%. Description adds meaning for rule_type (explains two values and their behavior) and indicates test is optional custom data. However, it does not specify structure of test parameter, leaving ambiguity.

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 clearly states the tool validates a Wirefilter rule expression, specifies the two rule types (waf and smart_firewall) with their scope, and indicates optional testing. This distinguishes it from siblings like 'validate_waf_expression_with_tests'.

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?

Describes when to use each rule_type and mentions that smart_firewall does not support http.* fields. Provides context for selecting the correct scheme. Does not explicitly mention when not to use this tool versus siblings.

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/gen0sec/mcp-server'

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