Skip to main content
Glama

waf__CreateAnticrawlerRule

Creates a WAF JavaScript anti-crawler rule to protect or exclude specific paths under a specified policy; configure the anti-crawler protection mode first.

Instructions

[WAF] 创建JS脚本反爬虫规则,在调用此接口创建防护规则前,需要调用更新JS脚本反爬虫规则防护模式(UpdateAnticrawlerRuleType)接口指定防护模式

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": {
      "conditions": "<conditions>",
      "name": "<name>",
      "policy_id": "<policy_id>",
      "priority": "<priority>",
      "project_id": "<project_id>",
      "type": "<type>"
    },
    "name": "waf__CreateAnticrawlerRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes规则名称
typeYesJS脚本反爬虫规则类型,指定防护路径:anticrawler_specific_url 排除防护路径:anticrawler_except_url
priorityYes执行该规则的优先级,值越小,优先级越高,值相同时,规则创建时间早,优先级越高。取值范围:0到1000。
policy_idYes防护策略id,通过指定防护策略id来指明查询该防护策略下的防护规则,您可以通过调用查询防护策略列表(ListPolicy)获取策略id
conditionsYes匹配条件列表
project_idYes项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID
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?

With no annotations supplied, the description carries the full burden, and it does disclose one important behavioral fact — the ordering dependency on UpdateAnticrawlerRuleType. However, it says nothing about required permissions, whether the rule takes effect immediately, how it interacts with existing rules of the same policy, or what the call returns.

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 states the action first and the prerequisite second, with no filler. It is slightly dense due to the embedded parenthetical API name, but every clause carries information.

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 mutation tool with seven parameters, a required nested conditions array, no annotations, and no output schema, the definition covers purpose and one prerequisite but leaves permissions, runtime effect, and idempotency/conflict behavior unaddressed. Adequate to start a correct call, not complete.

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 all seven parameters including the nested conditions fields are already documented in the schema, making the baseline 3 appropriate. The description adds no parameter-level meaning beyond implying that a protection mode must be configured first; it never mentions the important type (specific vs. except URL) or priority semantics.

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 (create a JS-script anticrawler rule) tagged with the [WAF] domain, which separates it from the many other Create*Rule siblings by resource type. It does not explicitly contrast itself with adjacent rule-creation tools such as CreateAntiTamperRule, so it falls short of a 5.

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 states a concrete precondition: UpdateAnticrawlerRuleType must be called to set the protection mode before this creation call. That is genuinely actionable usage guidance and names the exact sibling to call first, though it offers no guidance on when to choose this rule type over other WAF rule types or on failure handling.

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