Skip to main content
Glama

as__CreateScalingV2Policy

Creates V2 auto scaling policies for scaling groups or bandwidth resources, supporting alarm, scheduled, and recurring triggers so you can automate capacity and bandwidth adjustments.

Instructions

[AS] 可针对不同类型资源如伸缩组或带宽,创建弹性伸缩策略。创建弹性伸缩策略V2版本与V1版本的区别在于,V2版本支持创建对带宽资源进行调整的策略,通过伸缩资源类型区分伸缩资源。

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": {
      "project_id": "<project_id>",
      "scaling_policy_name": "<scaling_policy_name>",
      "scaling_policy_type": "<scaling_policy_type>",
      "scaling_resource_id": "<scaling_resource_id>",
      "scaling_resource_type": "<scaling_resource_type>"
    },
    "name": "as__CreateScalingV2Policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
alarm_idNo告警ID,即告警规则的ID,当scaling_policy_type为ALARM时该项必选,此时scheduled_policy不生效。创建告警策略成功后,会自动为该告警ID对应的告警规则的alarm_actions字段增加类型为autoscaling的告警触发动作。告警ID通过查询云监控告警规则列表获取,详见《云监控API参考》的“查询告警规则列表”。
project_idYes租户标识
descriptionNo伸缩策略描述(1-256个字符)
cool_down_timeNo冷却时间,取值范围0-86400,默认为300,单位是秒。
scheduled_policyNo定时、周期任务策略
scaling_policy_nameYes策略名称(1-64)字符,可以用中文、字母、数字、下划线、中划线的组合。
scaling_policy_typeYes策略类型。告警策略:ALARM(与alarm_id对应);定时策略:SCHEDULED(与scheduled_policy对应);周期策略:RECURRENCE(与scheduled_policy对应)
scaling_resource_idYes伸缩资源ID,伸缩组唯一标识或带宽唯一标识。如果scaling_resource_type为SCALING_GROUP,对应伸缩组唯一标识。如果scaling_resource_type为BANDWIDTH,对应带宽唯一标识。说明:- 弹性伸缩不支持对包年包月的带宽进行调整。
scaling_policy_actionNo策略执行具体动作。
scaling_resource_typeYes伸缩资源类型。伸缩组:SCALING_GROUP。带宽:BANDWIDTH。
interval_alarm_actionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.4/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 burden for a creation (mutation) tool. Beyond the V1/V2 distinction it discloses nothing about side effects, required permissions, idempotency, or what happens to an existing policy with the same name; the useful detail that an ALARM policy wires an alarm_actions trigger lives only in the schema.

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?

Two short sentences, front-loaded with the purpose and followed by the V2 differentiation. The trailing clause '通过伸缩资源类型区分伸缩资源' restates a point already made and could be dropped without loss.

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 an 11-parameter, nested-object creation tool with no output schema and no annotations, the description covers purpose and the V1/V2 split but omits the conditional required fields (alarm_id for ALARM, scheduled_policy for SCHEDULED/RECURRENCE) and any confirmed response behavior. The rich schema compensates for most parameter gaps, leaving behavioral coverage thin.

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 91%, so the schema already defines nearly every parameter, including the enum values and type-dependent rules. The description adds only the conceptual split between scaling-group and bandwidth resources, which the schema states more precisely, 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 states a specific verb and resource ('创建弹性伸缩策略' V2) and explicitly distinguishes it from the V1 counterpart by noting that V2 alone supports bandwidth resources. An agent can tell it apart from as__CreateScalingPolicy, though it never names that sibling or the other read/update/delete policy tools.

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 real selection rule: use this V2 tool when the target resource is bandwidth, since V1 cannot adjust bandwidth. The guidance is comparative and actionable but one-sided – it never states when to prefer V1, nor any prerequisites such as project_id scope or required field combinations.

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