Skip to main content
Glama

cfw__UpdateAclRule

Update an existing Cloud Firewall ACL rule by rule ID and project ID to change its name, action, status, addresses, or services. Use it to modify firewall access control without recreating the rule.

Instructions

[CFW] 更新ACL规则

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": {
      "acl_rule_id": "<acl_rule_id>",
      "project_id": "<project_id>"
    },
    "name": "cfw__UpdateAclRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo
nameNo规则名称
typeNo规则类型,0:互联网规则,1:vpc规则,2:nat规则
sourceNo源地址传输对象
statusNo规则启用状态,0表示禁用,1表示启用
serviceNo服务对象
directionNo方向:0表示外到内,1表示内到外,规则type=0(互联网规则)或者type= 2(nat规则)时方向值必填
project_idYes项目ID, 可以从调API处获取,也可以从控制台获取。[项目ID获取方式](cfw_02_0015.xml)
acl_rule_idYes规则id,可通过[查询防护规则接口](ListAclRules.xml)查询获得,通过返回值中的data.records.rule_id(.表示各对象之间层级的区分)获得。
action_typeNo规则动作,0表示允许通行(permit),1表示拒绝通行(deny)
descriptionNo规则描述
destinationNo源地址传输对象
address_typeNo地址类型,0表示ipv4,1表示ipv6
applicationsNo规则应用列表,规则应用类型包括:“HTTP”,"HTTPS","TLS1",“DNS”,“SSH”,“MYSQL”,“SMTP”,“RDP”,“RDPS”,“VNC”,“POP3”,“IMAP4”,“SMTPS”,“POP3S”,“FTPS”,“ANY”,“BGP”等。
fw_instance_idNo防火墙id,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取
long_connect_timeNo长连接时长
long_connect_enableNo是否支持长连接,0表示不支持,1表示支持
enterprise_project_idNo企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0
long_connect_time_hourNo长连接时长对应小时
long_connect_time_minuteNo长连接时长对应分钟
long_connect_time_secondNo长连接时长秒

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.3/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 behavioral burden, and it discloses nothing: not whether the update is a full replacement or a partial merge of the 21 optional fields, not the permission/auth requirements, and not irreversibility. Only the word "更新" hints at mutation, which is already evident from the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

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

It is a single short phrase with no padding, but for a 21-parameter mutation tool this level of brevity is under-specification rather than conciseness. Nothing is front-loaded beyond the bare verb and resource.

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

Completeness1/5

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

With 21 parameters, nested DTOs, five enums, no annotations, and no output schema, the definition is far too thin for the tool's complexity. Critical questions an agent must answer before calling, such as full-replace vs partial-update semantics and required permissions, are left entirely unaddressed.

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 95%, so the schema already documents the large nested source/service/destination objects and the enum values in detail. The description adds no parameter meaning of its own, which matches the baseline-3 expectation when the schema does the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/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 ("更新ACL规则" / update ACL rule), so the basic operation is identifiable. However, it gives no scope or qualifier that separates it from close siblings such as cfw__BatchUpdateAclRuleActions or cfw__UpdateAclRuleOrder, and it does not say what aspects of the rule are updated.

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?

There is no when-to-use guidance, no prerequisites, and no mention of alternatives. An agent has to infer from the name alone whether this is a full replace, a partial patch, or a single-rule variant of the batch sibling.

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