Skip to main content
Glama

waf__UpdatePunishmentRule

Updates a Huawei Cloud WAF attack punishment rule to change its category, block duration, or description within a specified protection policy.

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>",
      "rule_id": "<rule_id>"
    },
    "name": "waf__UpdatePunishmentRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
rule_idYes攻击惩罚规则id,通过查询攻击惩罚规则列表接口(ListPunishmentRules)获取
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

D1.9/5.0
Behavior1/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it discloses nothing about the mutation: whether the update replaces or merges fields, whether omitted optional fields are reset, required permissions, or reversibility. For a write operation with seven parameters this is a serious gap.

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

Conciseness2/5

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

The single phrase is short but not concise in the useful sense — it is under-specified rather than economical. There is no structure, no front-loaded scope statement, and no information an agent could act on beyond the name.

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?

Given a mutation tool with 7 parameters (5 required), an enum-constrained category, coupled block_time constraints, no annotations, and no output schema, the description is completely inadequate. It omits behavior, permissions, side effects, and any guidance on the relationship between category and block_time.

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%, and the schema already documents rule_id, policy_id, block_time ranges, category enum values, and project/enterprise project IDs. The description adds nothing beyond the schema, so the baseline of 3 applies.

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

Purpose2/5

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

The description "[WAF] 更新攻击惩罚规则" is essentially a Chinese restatement of the tool name UpdatePunishmentRule. It signals a mutation of an attack punishment rule but adds no scope, target, or differentiating detail versus siblings like CreatePunishmentRule, DeletePunishmentRule, or ShowPunishmentRule.

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, no prerequisites (e.g., rule must already exist, policy must be in place), and no mention of alternatives. Only the verb 'update' weakly implies this applies to an existing rule rather than creating one.

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