Skip to main content
Glama

waf__UpdateCustomRule

Updates a WAF precise protection rule's name, priority, match conditions, action, and effective time within a policy, enabling adjustments to custom access controls without recreating the rule.

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": {
      "action": "<action>",
      "conditions": "<conditions>",
      "name": "<name>",
      "policy_id": "<policy_id>",
      "priority": "<priority>",
      "project_id": "<project_id>",
      "rule_id": "<rule_id>",
      "time": "<time>"
    },
    "name": "waf__UpdateCustomRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes规则名称
timeYes精准防护规则生效时间:
startNo精准防护规则生效的起始时间戳(秒)。当time=true,才需要填写该参数。
actionYes精准防护规则命中后操作对象
rule_idYes精准防护规则id,通过查询精准防护规则列表接口(ListCustomRules)获取
priorityYes执行该规则的优先级,值越小,优先级越高,值相同时,规则创建时间早,优先级越高。取值范围:0到1000。
terminalNo精准防护规则生效的终止时间戳(秒)。当time=true,才需要填写该参数。
policy_idYes防护策略id,通过指定防护策略id来指明查询该防护策略下的防护规则,您可以通过调用查询防护策略列表(ListPolicy)获取策略id
conditionsYes匹配条件列表
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.8/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 nothing: not whether this is a full replacement (8 of 12 fields required suggests it may be), whether omitted optional fields are cleared, what permissions or policy state are required, or whether the change is reversible. For a mutation tool with 12 parameters and nested objects, that is a substantial gap.

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 line is front-loaded and contains no filler, but its brevity comes from omission rather than discipline — it is under-specified for the operation it names. Nothing is wasted, yet almost nothing is conveyed.

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?

Given a mutation tool with 12 parameters, nested condition objects, enum-bearing action objects, no annotations, and no output schema, the description is far too thin. An agent can construct a call from the schema alone, but nothing tells it about replacement semantics, prerequisites, or consequences of the update.

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 explains rule_id, policy_id, priority range, the time/start/terminal interaction, and the conditions structure. The description adds no meaning beyond that, so the baseline of 3 applies.

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

Purpose4/5

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

The description names a specific verb (更新/update) and a specific resource (精准防护规则 / precise-protection rule), which is enough for an agent to know this modifies an existing custom WAF rule rather than the many sibling rule types (CC, geoip, antitamper). It does not, however, say what an update replaces or how it differs from CreateCustomRule/ShowCustomRule.

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: nothing states that the rule must already exist, that rule_id comes from ListCustomRules, or when to prefer this over CreateCustomRule or UpdatePolicyRuleStatus. The only routing information available is the resource name.

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