Skip to main content
Glama

waf__CreateCustomRule

Create a precise WAF protection rule in a policy with custom match conditions, priority, action, and effective time.

Instructions

[WAF] 创建精准防护规则

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "conditions": "<conditions>",
      "name": "<name>",
      "policy_id": "<policy_id>",
      "priority": "<priority>",
      "project_id": "<project_id>",
      "time": "<time>"
    },
    "name": "waf__CreateCustomRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes规则名称
timeYes精准防护规则生效时间:
startNo精准防护规则生效的起始时间戳(秒)。当time=true,才需要填写该参数。
actionYes精准防护规则命中后操作对象
priorityYes执行该规则的优先级,值越小,优先级越高,值相同时,规则创建时间早,优先级越高。取值范围:0到1000。
terminalNo精准防护规则生效的终止时间戳(秒)。当time=true,才需要填写该参数。
policy_idYes防护策略id,通过指定防护策略id来指明查询该防护策略下的防护规则,您可以通过调用查询防护策略列表(ListPolicy)获取策略id
conditionsYes匹配条件列表
project_idYes项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID
descriptionNo规则描述
enterprise_project_idNo您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it only restates the name. It says nothing about required permissions, whether the new rule takes effect immediately, how priority interacts with existing rules, what the response returns, or whether the operation is reversible — all critical for an 11-parameter mutation tool with nested condition objects.

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

Conciseness3/5

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

It is a single short sentence with zero filler and is trivially front-loaded, but the extreme brevity is under-specification rather than disciplined conciseness for a tool of this complexity. The "[WAF]" tag prefix is the only structure present.

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

Completeness1/5

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

For a creation tool with 7 required parameters, nested condition arrays, an enum-bearing action object, and no annotations or output schema, a one-line description leaves the agent without the context needed to call it safely. Nearly all behavioral and usage information an agent needs is absent.

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 100%, so every parameter (including nested condition fields, action.category enum values, and the time/start/terminal coupling) is already documented in the schema. The description adds no parameter meaning beyond that, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"[WAF] 创建精准防护规则" names a specific verb (创建/create) and a specific resource (精准防护规则/custom precision-protection rule), which is enough to distinguish it from the other create siblings such as CreateCcRule or CreateGeoipRule by resource type. It stops short of any sibling differentiation in prose, so it lands at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance at all: no mention of prerequisites (a policy_id must exist, obtainable via ListPolicy only because the schema says so), no indication of how this differs from the many other *Rule creation siblings, and no note about ordering or conflicts with existing rules. The agent must infer everything from the tool name alone.

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

Deploy Server

Other Tools