Skip to main content
Glama

waf__CreatePrivacyRule

Create a privacy masking rule in a WAF policy to hide specified fields from logs. Define the protected URL, field category, and field name to keep sensitive data out of logs.

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": {
      "category": "<category>",
      "index": "<index>",
      "policy_id": "<policy_id>",
      "project_id": "<project_id>",
      "url": "<url>"
    },
    "name": "waf__CreatePrivacyRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes隐私屏蔽规则防护的url,需要填写标准的url格式,例如/admin/xxx或者/admin/*,以"*"(星号)结尾代表路径前缀
indexYes屏蔽字段名,根据“屏蔽字段”设置字段名,被屏蔽的字段将不会出现在日志中。屏蔽字段名的长度不能超过2048字节,且只能由数字、字母、下划线和中划线组成。
categoryYes屏蔽字段
policy_idYes防护策略id,您可以通过调用查询防护策略列表(ListPolicy)获取策略id
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 disclosure burden. '创建' implies a mutating write, but the description says nothing about permission requirements, whether the rule takes effect immediately, quota limits, or what happens on conflicting rules. The parameter descriptions in the schema mention obtaining policy_id/project_id from other APIs, but that is structured data, not description content.

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 front-loaded and contains no filler, but it is drastically undersized for a tool with seven parameters and five required fields. Conciseness here reflects under-specification rather than efficiency.

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 a seven-parameter mutation tool with no annotations and no output schema, a ten-character title is not enough. It leaves the agent without routing guidance, side-effect expectations, or return-value expectations. The rich schema compensates only partially.

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 parameter (url, index, category, policy_id, project_id, description, enterprise_project_id) has a documented description, including an enum for category. The tool description adds no 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.

Purpose4/5

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

The description gives a specific verb and resource combination ('创建' + '隐私屏蔽防护规则'), which maps clearly to creating a privacy-masking rule. The rule type ('隐私屏蔽', privacy masking) distinguishes it from sibling creators such as CreateAntiTamperRule, CreateCcRule, CreateGeoipRule, and others. It stops short of 5 because it is a bare title-style phrase with no elaboration on scope.

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 contains no when-to-use guidance, no prerequisites, and no exclusions. It never mentions that a policy_id from ListPolicy is required or that UpdatePrivacyRule/DeletePrivacyRule are the alternatives for other lifecycle operations. The agent must infer all routing from the tool name and schema 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