Skip to main content
Glama

waf__CreatePunishmentRule

Creates a WAF attack punishment rule within a protection policy, specifying the punishment category and block duration to control responses to detected attacks.

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": {
      "block_time": "<block_time>",
      "category": "<category>",
      "policy_id": "<policy_id>",
      "project_id": "<project_id>"
    },
    "name": "waf__CreatePunishmentRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
categoryYes攻击惩罚类别
policy_idYes防护策略id,您可以通过调用查询防护策略列表(ListPolicy)获取策略id
block_timeYes拦截时间,如果选择前缀为long的攻击惩罚类别,则block_time时长范围设置为301-1800;选择前缀为short的攻击惩罚类别,则block_time时长范围为0-300之间
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.6/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 disclosure burden for a mutating create operation. It says nothing about whether rule creation is idempotent, what happens on duplicate rules, required permissions, or that block_time must match the long/short category prefix — that constraint lives only in the schema.

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

Conciseness4/5

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

A single short, front-loaded fragment with zero waste (the '[WAF]' prefix aids filtering across a large sibling catalog). It is efficient, though its brevity is under-specification rather than true conciseness.

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

Completeness2/5

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

For a six-parameter, four-required mutation tool with no annotations and no output schema, the description supplies only a name restatement. An agent cannot learn from it what a punishment rule does, what it returns, or the interaction between category and block_time without reading the schema.

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%, with the enum for category and the block_time range rules documented inline, so the schema does the heavy lifting. The description adds no parameter meaning beyond that, which is the expected baseline when coverage is complete.

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

Purpose3/5

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

The description gives a verb+resource pair ('创建' + '攻击惩罚规则') with a '[WAF]' domain tag, which is marginally more specific than the raw name CreatePunishmentRule because it clarifies this is an attack-punishment rule in the WAF product. However, it is essentially a restatement of the tool name with no indication of scope, effect, or how the created rule relates to a policy.

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?

No guidance on when to use this versus waf__UpdatePunishmentRule or the other Create* rule tools, and no prerequisites such as needing an existing policy_id. The agent is left to infer everything from the name and schema.

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