Skip to main content
Glama

waf__CreateCcRule

Creates a Huawei Cloud WAF CC protection rule to limit request rates by IP, cookie, header, URL, or other criteria and define block, captcha, log, or dynamic-block actions.

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>",
      "tag_type": "<tag_type>"
    },
    "name": "waf__CreateCcRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYescc规则防护模式,对应console上的mode,现在只支持创建高级cc规则防护模式。
nameNo规则名称
actionYes请求次数限制到达后采取的防护动作
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.4/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 and it discloses essentially nothing. It does not state that this is a write operation creating persistent WAF configuration, does not note the 1~3600 second limit_period or the mode=0/1 restriction that the schema hints at, and does not mention authentication or project scoping requirements.

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?

The single phrase is free of padding, but it is under-specified rather than concise: it is roughly title-length for a tool with 8 required parameters and a nested action object. It is front-loaded in the sense that the verb comes first, yet there is nothing substantive after it.

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?

With 17 parameters, 8 required fields, no annotations, and no output schema, the description should explain the advanced-CC-mode dependency, the action/conditions coupling, and what is returned on success. None of that is present, so the definition is not sufficient for an agent to call the tool correctly without reconstructing intent from 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% and every one of the 17 parameters carries its own Chinese description, including conditional requirements such as tag_index for cookie/header modes and unlock_num for dynamic_block. The description adds no meaning beyond the schema, so the baseline 3 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?

"创建cc规则" states a specific verb (创建) and a specific resource (cc规则), so the core purpose is recoverable. It does not distinguish this tool from waf__CreateCustomRule, waf__CreatePunishmentRule, or other Create*Rule siblings, and it does not say what a CC rule controls or which policy it attaches to.

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?

The description gives no when-to-use guidance, no statement of which mode (basic vs. advanced) this tool supports, and no prerequisites such as obtaining policy_id first. It also does not point to waf__UpdateCcRule or waf__ListCcRules as the alternatives for editing or inspecting existing rules, leaving the agent to infer the workflow from sibling names 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