Skip to main content
Glama

waf__CreatePolicy

Create a Web Application Firewall (WAF) protection policy with default settings in a specified Huawei Cloud project; adjust default rule options later via an update policy call.

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>",
      "project_id": "<project_id>"
    },
    "name": "waf__CreatePolicy"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes策略名称(策略名称只能由数字、字母和下划线组成,长度不能超过64为字符)
project_idYes项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID
log_action_replacedNocc规则和精准防护规则“防护动作”选择“仅记录”时,Web基础防护是否命中策略规则并阻断,默认为true
enterprise_project_idNo您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/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 burden. It does disclose a real behavioral trait beyond the schema — that the system auto-populates default configuration items at creation and those cannot be adjusted through this call — but it omits permissions required, whether creation is idempotent, and what the response returns (e.g., a policy ID needed for follow-up calls).

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 front-loaded sentence establishes the action first, then the default-configuration behavior, then the escape hatch to the update interface. No filler, though the trailing clause is somewhat run-on.

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?

With no annotations and no output schema, the description should say more about what the call yields (a policy identifier) and any side effects such as default rule activation. It adequately covers creation semantics and the modification path but leaves the agent guessing about the return value needed for subsequent operations.

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 name format restrictions, project_id lookup path, and the meaning of log_action_replaced. The description adds no parameter-level guidance beyond that, so the 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 opens with a specific verb and resource ('[WAF] 创建防护策略'), so it is instantly clear this creates a WAF protection policy rather than a rule, host, or certificate. It also implicitly separates itself from the update path by stating that default settings are applied at creation time.

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

Usage Guidelines4/5

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

It gives a clear conditional directive: if the default configuration items need changing, call the update protection policy interface instead. That routes the agent to a named alternative with a stated condition, though it does not cover prerequisites (e.g., project readiness) or when not to create a policy at all.

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