Skip to main content
Glama

waf__UpdatePolicyRuleStatus

Enable or disable a single WAF policy rule by updating its status, such as turning off a specific precise protection rule. Use policy ID, rule ID, and rule type to target 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": {
      "policy_id": "<policy_id>",
      "project_id": "<project_id>",
      "rule_id": "<rule_id>",
      "ruletype": "<ruletype>"
    },
    "name": "waf__UpdatePolicyRuleStatus"
  }
}

Input Schema

NameRequiredDescriptionDefault
statusNo状态(开启:1,关闭:0)
rule_idYes规则id,根据不同的规则类型(ruletype)调用规则列表接口获取规则id,例如黑白名单(whiteblackip)规则id,您可以通过调用查询黑白名单规则列表(ListWhiteblackipRule)获取规则id
ruletypeYes策略类型
policy_idYes策略id(策略id从查询防护策略列表接口获取)
project_idYes项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID
enterprise_project_idNo您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.4/5.0
Behavior3/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 disclose the core behavior — only the rule's status changes, and the operation is a reversible enable/disable toggle — which is useful. However, it says nothing about permission requirements, whether the change takes effect immediately, or how errors are surfaced for a 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?

A single compact sentence that front-loads the action and follows with the enable/disable clarification and one example. The middle clause ("用于开启或者关闭单条规则") partly restates the opening clause, but the redundancy is small and the whole is easy to scan.

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?

For a six-parameter mutation tool with no annotations and no output schema, the description covers the essential intent but omits the ID-provenance and permission context that the schema only partially supplies. It is adequate to call the tool correctly, but not fully self-sufficient for an agent unfamiliar with the WAF rule model.

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 the schema already documents status values, ruletype enum values, and the ID parameters. The description adds only the example of a precise-protection rule, which loosely hints at the ruletype dimension but does not explain parameter formats or the required IDs beyond what the schema states. Baseline 3 is appropriate.

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 ("修改单条规则的状态" / modify the status of a single rule) and clarifies the effect as enabling or disabling one rule, with a concrete example (disabling a precise-protection rule). It is clear on its own, but it does not distinguish this generic status tool from the many per-type sibling update tools (e.g. UpdateWhiteblackipRule, UpdateCcRule), so an agent must infer the relationship from the ruletype enum.

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?

The description implies the use case — toggling a single rule on or off — but gives no explicit when-to-use versus when-not guidance and names no alternative. It also omits the prerequisite that policy_id, project_id and rule_id must be obtained from the corresponding list/query endpoints first, which the schema mentions but the description does not.

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