Skip to main content
Glama

waf__UpdatePolicy

Update a Huawei Cloud WAF protection policy with only the fields you need to change, such as rules, actions, options, or bound domains.

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

Input Schema

NameRequiredDescriptionDefault
nameNo防护策略名
hostsNo与防护策略绑定的防护的域名id数组
levelNoWeb基础防护等级
actionNo防护动作信息
extendNo扩展字段,用于存放Web基础防护中一些开关配置等信息
optionsNo该参数存放防护策略里防护项的开关信息
bind_hostNo与防护策略绑定的防护的域名信息数组,相对于hosts字段,包含更详细的域名信息
policy_idYes防护策略id,您可以通过调用查询防护策略列表(ListPolicy)获取策略id
project_idYes项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID
robot_actionNo用于存放网站反爬虫中特征反爬虫动作信息
full_detectionNo精准防护中的检测模式。
modulex_optionsNo智能访问控制防护项相关配置信息,目前该特性还处于公测阶段,只有部分局点支持该特性
enterprise_project_idNo您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/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. It does disclose the important non-obvious trait that omitted fields are left untouched (partial update), which prevents accidental overwrites. It says nothing about permission requirements, reversibility, side effects on bound hosts, or what the call returns - significant gaps for a 13-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.

Conciseness4/5

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

Two tight clauses, front-loaded with the action and immediately followed by the partial-update rule; zero filler. It is arguably over-terse for a tool with 13 parameters and nested option objects, but nothing in it is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 13 parameters, deep nested objects (options, action, bind_host), no annotations, and no output schema, the description is minimal but covers the one thing most likely to cause damage - partial versus full replacement. It leaves return behavior, permission expectations, and the relationship between hosts and bind_host unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains each field, and the baseline would be 3. The description earns an extra point because the 'only send what needs updating' clause is a semantic rule about how every non-required body parameter behaves that the schema does not state.

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 and resource ('更新防护策略' / update protection policy) with the [WAF] tag scoping it to the WAF product, and adds the key qualifier that the body may be partial. It does not distinguish this from siblings such as UpdatePolicyProtectHost or UpdatePolicyRuleStatus, which also operate on policies, so the agent must rely on the tool name for differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Declaring that only changed fields need to be sent implies a read-modify-write/PATCH workflow, which is a usable hint. However, there is no explicit statement of when to choose this tool over UpdatePolicyProtectHost, UpdatePolicyRuleStatus, or UpdateHost, and no prerequisites (e.g., needing a policy_id from ListPolicy) are given in the description 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