Skip to main content
Glama

as__CreateScalingGroup

Creates an Auto Scaling group from a scaling configuration, defining VPC subnets, instance limits, load balancing, health checks, and tags to automate capacity management.

Instructions

[AS] 伸缩组是具有相同应用场景的实例的集合,是启停伸缩策略和进行伸缩活动的基本单位。伸缩组内定义了最大实例数、期望实例数、最小实例数、虚拟私有云、子网、负载均衡等信息。默认最多可以创建10个伸缩组。如果伸缩组配置了负载均衡,在添加或移除实例时,会自动为实例绑定或解绑负载均衡监听器。如果伸缩组使用负载均衡健康检查方式,伸缩组中的实例需要启用负载均衡器的监听端口才能通过健康检查。端口启用可在安全组中进行配置,可参考添加安全组规则进行操作。

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": {
      "networks": "<networks>",
      "project_id": "<project_id>",
      "scaling_configuration_id": "<scaling_configuration_id>",
      "scaling_group_name": "<scaling_group_name>",
      "vpc_id": "<vpc_id>"
    },
    "name": "as__CreateScalingGroup"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNo创建特定标签并将其添加到伸缩组。每个伸缩组最多添加10个标签。
vpc_idYesVPC信息,通过查询VPC服务VPC列表接口获取,详见《虚拟私有云API参考》的“查询VPC列表”。
networksYes网络信息,最多支持选择5个子网,传入的第一个子网默认作为云服务器的主网卡。获取子网信息请参考[查询子网列表](https://support.huaweicloud.com/api-vpc/vpc_subnet01_0003.html)。
project_idYes项目ID
descriptionNo伸缩组描述信息(0-256个字符)
delete_volumeNo配置删除云服务器时是否删除云服务器绑定的数据盘。取值为true或false,默认为false。 true:删除云服务器时,会同时删除绑定在云服务器上的数据盘。当数据盘的计费方式为包年包月时,不会被删除。 false:删除云服务器时,仅解绑定在云服务器上的数据盘,不删除数据盘。
notificationsNo通知方式:EMAIL为发送邮件通知。该通知方式即将被废除,建议给弹性伸缩组配置通知功能。详见通知。
cool_down_timeNo冷却时间,取值范围0-86400,默认为300,单位是秒。 只针对告警策略生效,定时、周期策略和手动触发策略不受该参数限制。
lb_listener_idNo弹性负载均衡(经典型)监听器ID,最多支持绑定6个负载均衡监听器,多个负载均衡监听器ID以逗号分隔。首先使用vpc_id通过查询ELB服务负载均衡器列表接口获取负载均衡器的ID,详见《弹性负载均衡API参考》的“查询负载均衡器列表”,再使用该ID查询监听器列表获取,详见《弹性负载均衡API参考》的“查询监听器列表”。
available_zonesNo可用分区信息。弹性伸缩活动中自动添加的云服务器会被创建在指定的可用区中。如果没有指定可用分区,会由系统自动指定可用分区。详情请参考地区和终端节点。
delete_publicipNo配置删除云服务器时是否删除云服务器绑定的弹性IP。取值为true或false,默认为false。true:删除云服务器时,会同时删除绑定在云服务器上的弹性IP。当弹性IP的计费方式为包年包月时,不会被删除。false:删除云服务器时,仅解绑定在云服务器上的弹性IP,不删除弹性IP。
iam_agency_nameNo委托的名称委托是由租户管理员在统一身份认证服务(Identity and Access Management,IAM)上创建的,可以为弹性云服务器提供访问云服务的临时凭证。
lbaas_listenersNo弹性负载均衡器(增强型)信息,最多支持绑定6个负载均衡。该字段与lb_listener_id互斥。
security_groupsNo安全组信息,最多支持选择1个安全组。使用vpc_id通过查询VPC服务安全组列表接口获取,详见《虚拟私有云API参考》的“查询安全组列表”。当伸缩配置和伸缩组同时指定安全组时,将以伸缩配置中的安全组为准;当伸缩配置和伸缩组都没有指定安全组时,将使用默认安全组。为了使用灵活性更高,推荐在伸缩配置中指定安全组。
scaling_group_nameYes伸缩组名称(1-64个字符),只能包含中文、字母、数字、下划线、中划线。
max_instance_numberNo最大实例数量,默认值为0。
min_instance_numberNo最小实例数量,默认值为0。
enterprise_project_idNo企业项目ID,用于指定伸缩组归属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目,如何获取企业项目ID,请参考[查询企业项目列表](https://support.huaweicloud.com/api-em/zh-cn_topic_0121230880.html)。当伸缩组配置企业项目时,由该伸缩组创建的弹性云服务器将归属于该企业项目。否则将使用默认企业项目。说明:关于企业项目特性的详细信息,请参见[企业项目管理](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0131965280.html)。
desire_instance_numberNo期望实例数量,默认值为最小实例数。最小实例数<=期望实例数<=最大实例数
multi_az_priority_policyNo伸缩组扩缩容时目标AZ选择的优先级策略:EQUILIBRIUM_DISTRIBUTE(默认):均衡分布,云服务器扩缩容时优先保证available_zones列表中各AZ下虚拟机数量均衡,当无法在目标AZ下完成虚拟机扩容时,按照PICK_FIRST原则选择其他可用AZ。PICK_FIRST:选择优先,虚拟机扩缩容时目标AZ的选择按照available_zones列表的顺序进行优先级排序。
scaling_configuration_idYes伸缩配置ID,通过查询弹性伸缩配置列表接口获取。
instance_terminate_policyNo伸缩组实例移除策略:OLD_CONFIG_OLD_INSTANCE(默认):从根据“较早创建的配置”创建的实例中筛选出较早创建的实例被优先移除。OLD_CONFIG_NEW_INSTANCE:从根据“较早创建的配置”创建的实例中筛选出较新创建的实例被优先移除。OLD_INSTANCE:较早创建的实例被优先移除。NEW_INSTANCE:较新创建的实例将被优先移除。
health_periodic_audit_timeNo伸缩组实例的健康检查周期,可设置为1、5、15、60、180(分钟),若不设置该参数,默认为5。若设置为0,可以实现10秒级健康检查。
health_periodic_audit_methodNo伸缩组实例健康检查方式:ELB_AUDIT和NOVA_AUDIT。当伸缩组参数中设置负载均衡时,默认为ELB_AUDIT;否则默认为NOVA_AUDIT。ELB_AUDIT表示负载均衡健康检查方式,在有监听器的伸缩组中有效。NOVA_AUDIT表示弹性伸缩自带的健康检查方式。
health_periodic_audit_grace_periodNo伸缩组实例健康状况检查宽限期,取值范围0-86400,单位是秒。当实例加入伸缩组并且进入已启用状态后,健康状况检查宽限期才会启动,伸缩组会等健康状况检查宽限期结束后才检查实例的运行状况。当伸缩组实例健康检查方式为ELB_AUDIT时,该参数生效,若不设置该参数,默认为600秒。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.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 contribute real behavioral context — a default quota of 10 scaling groups, automatic LB listener binding/unbinding, and the requirement to open LB listener ports for ELB health checks — but says nothing about the create operation itself: permissions needed (iam_agency_name), that the call is a mutation, mutual exclusivity of lb_listener_id vs lbaas_listeners, or what is returned.

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?

The text reads like a documentation excerpt about the scaling-group concept rather than a tool description; the single most important sentence — what the tool does — is absent, and the lead position is spent defining terminology. Length is moderate, but the content is not front-loaded around the action.

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 25-parameter mutation with 5 required fields, no annotations, and no output schema, the description is far too thin. An agent cannot learn from it that a scaling configuration is mandatory, how the classic vs enhanced LB parameters interact, or anything about the creation result.

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% across 25 parameters, so the schema does the heavy lifting and baseline 3 applies. The description loosely enumerates fields (max/desired/min instance counts, VPC, subnets, load balancing), which adds only marginal meaning beyond the schema's own detailed per-parameter documentation.

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 text explains what a scaling group is (a collection of instances, the unit on which policies act, containing max/desired/min, VPC, subnet, LB) but never states the action the tool performs. Only the tool name 'CreateScalingGroup' tells the agent this creates one, and nothing distinguishes it from siblings such as as__CreateScalingConfig or as__CreateScalingPolicy.

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. In particular, the required parameter scaling_configuration_id implies a scaling configuration must already exist, but the description never says so or routes the agent to as__CreateScalingConfig first.

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