Skip to main content
Glama

waf__CreateWhiteblackipRule

Creates a WAF blacklist or whitelist IP rule for a specified protection policy and project, using an IP address/range or IP address group.

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": {
      "name": "<name>",
      "policy_id": "<policy_id>",
      "project_id": "<project_id>",
      "white": "<white>"
    },
    "name": "waf__CreateWhiteblackipRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
addrNo黑白名单ip地址,需要输入标准的ip地址或地址段,例如:42.123.120.66或42.123.120.0/16
nameYes规则名称只能由字母、数字、-、_和.组成,长度不能超过64个字符
startNo规则生效开始时间,生效模式为自定义时,此字段才有效,请输入时间戳
whiteYes防护动作:
terminalNo规则生效结束时间,生效模式为自定义时,此字段才有效,请输入时间戳
policy_idYes防护策略id,您可以通过调用查询防护策略列表(ListPolicy)获取策略id
time_modeNo生效模式,默认为permanent(立即生效),创建自定义生效规则时请输入:customize
project_idYes项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID
descriptionNo黑白名单规则描述
ip_group_idNo创建的Ip地址组id,该参数与addr参数只能使用一个;Ip地址组可在控制台中对象管理->地址组管理中添加。
enterprise_project_idNo您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.5/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, yet it only reveals that a write (create) occurs. It says nothing about required IAM permissions, whether the caller must own the policy, what happens if both addr and ip_group_id are provided, or whether the rule takes effect immediately.

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 bracketed phrase is trivially front-loaded with zero wasted words, but its brevity is under-specification rather than effective concision. There is no structure to speak of beyond a product tag followed by a noun phrase.

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 an 11-parameter mutating tool with no annotations and no output schema, the definition is far too thin: it never explains the allow-vs-block semantics implied by the required "white" field, the immediate-vs-custom time modes, or the addr/ip_group_id exclusivity that materially affects a correct call.

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 all 11 parameters are already documented in the schema, including the mutually exclusive addr/ip_group_id and the time_mode/start/terminal relationship. The description adds no parameter meaning 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.

Purpose3/5

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

The description states a verb-plus-resource combination ("创建" + "黑白名单规则"), so an agent can tell this creates an IP allow/deny-list rule. However, it is essentially a restatement of the tool name with a "[WAF]" prefix and does nothing to distinguish it from sibling creators such as CreateGeoipRule, CreateCcRule, or CreateCustomRule.

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 (needing a policy_id), no indication of when to prefer this over CreateGeoipRule or the address-group-based rules, and no statement about what happens on duplicate rules. The only routing signal is the name itself.

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