Skip to main content
Glama

waf__UpdateCcRule

Updates an existing CC protection rule in Huawei Cloud WAF by rule ID, setting rate-limit conditions, thresholds, actions, and blocking periods within a policy.

Instructions

[WAF] 更新cc防护规则

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>",
      "limit_num": "<limit_num>",
      "limit_period": "<limit_period>",
      "mode": "<mode>",
      "policy_id": "<policy_id>",
      "project_id": "<project_id>",
      "rule_id": "<rule_id>",
      "tag_type": "<tag_type>"
    },
    "name": "waf__UpdateCcRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo需要防护的域名路径,当cc防护规则为标准模式(mode参数值为0)时,该参数必填。
modeYescc规则防护模式,对应console上的mode,现在只支持创建高级cc规则防护模式。
nameNo规则名称
actionYes请求次数限制到达后采取的防护动作
rule_idYesID of the cc rule. It can be obtained by calling the **ListCcRules** API.
tag_typeYes限速模式:
limit_numYes限制频率,单位为次,范围为1~2147483647
lock_timeNo阻断时间,单位为秒,范围为0~65535。当“防护动作”选择“阻断”时,可设置阻断后恢复正常访问页面的时间。
policy_idYes策略id(策略id从查询防护策略列表接口获取)
tag_indexNo用户标识,当限速模式为用户限速(cookie或header)时,需要传该参数。
conditionsYescc规则防护规则限速条件,当cc防护规则为高级模式(mode参数值为1)时,该参数必填。
project_idYes项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID
unlock_numNo放行频率,单位为次,范围为0~2147483647。只有当防护动作类型为dynamic_block时,才需要传该参数。
descriptionNo规则描述
limit_periodYes限速周期,单位为秒,范围1~3600
tag_conditionNo用户标识,当限速模式为other时,需要传该参数。根据Referer(自定义请求访问的来源)字段区分单个Web访问者
domain_aggregationNo是否开启域名聚合统计。
region_aggregationNo是否开启全局计数。
enterprise_project_idNo您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.1/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. It does not disclose replacement versus partial-update semantics, permission requirements, mode-specific constraints, or what happens to omitted fields for a 19-parameter mutation tool.

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 description is a single short phrase with no structure or front-loaded operational context. While not verbose, it is under-specified rather than genuinely concise.

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 complex mutation tool with 19 parameters, nested objects, and no annotations or output schema, the description is wholly inadequate. It leaves all behavioral and usage context to the schema and provides no update-specific guidance.

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?

The schema has 100% parameter description coverage, which provides detailed semantics for all 19 parameters including mode, conditions, action, and tag_type. The description adds no meaning beyond the schema, so the baseline score applies.

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 states a specific verb-resource pair, '更新cc防护规则' (update CC protection rule), which distinguishes it from sibling operations like CreateCcRule, DeleteCcRule, and ListCcRules. However, it adds no scope or detail beyond the resource name, so an agent knows only the broad operation.

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 guidance on when to use this tool versus CreateCcRule, ListCcRules, or ShowCcRule, nor any prerequisites or conditions. The description merely labels the operation without explaining selection criteria.

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