Skip to main content
Glama

apig__ChangeApiVersionV2

Changes the active version of a published API Gateway API by selecting a specified version, so the current definition and state reflect that version.

Instructions

[APIG] API每次发布时,会基于当前的API定义生成一个版本。版本记录了API发布时的各种定义及状态。

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": {
      "api_id": "<api_id>",
      "instance_id": "<instance_id>",
      "project_id": "<project_id>"
    },
    "name": "apig__ChangeApiVersionV2"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_idYesAPI的编号
project_idYes项目ID,获取方式请参见[获取项目ID](apig-api-180713009.xml)。
version_idNoAPI版本的编号
instance_idYes实例ID,在API网关控制台的“实例信息”中获取。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

D1.8/5.0
Behavior1/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 never says that this is a mutation that changes which version an API serves, what happens to the previously active version, whether the API must be published/offline first, or what permissions are needed. For a version-switching operation with zero annotation coverage, this is a serious gap.

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 is short but spends both sentences on general background about API versions rather than on the action being performed. It is under-specified rather than concise — trimming it would lose nothing because it conveys nothing about the call.

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?

A four-parameter mutation tool with no annotations and no output schema needs the description to explain the action, side effects, and expected result. This text provides only domain trivia, so an agent cannot reliably call it correctly from the definition alone.

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 the four parameters (api_id, project_id, instance_id, version_id) are already documented in the schema. The description adds no meaning about version_id selection or scoping, so the baseline 3 applies.

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

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description only defines what an API version is ('a version is generated on each publish and records the definitions and states at publish time'). It never states what the tool itself does — whether it switches the API to a given version, rolls back, or promotes one. The name 'ChangeApiVersionV2' implies an action the text never confirms, so the agent must guess the verb.

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

Usage Guidelines1/5

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

No when-to-use guidance, no prerequisites, no mention of alternatives such as apig__ListApiVersionsV2 or apig__BatchPublishOrOfflineApiV2. The text is background context only, leaving the agent with no signal about when this call is appropriate.

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