Skip to main content
Glama

apig__CreateEnvironmentVariable

Creates an API gateway environment variable for a specified API group and environment, enabling published APIs to use environment-specific values such as service addresses or version numbers.

Instructions

[APIG] 将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": {
      "env_id": "<env_id>",
      "group_id": "<group_id>",
      "variable_name": "<variable_name>",
      "variable_value": "<variable_value>"
    },
    "name": "apig__CreateEnvironmentVariable"
  }
}

Input Schema

NameRequiredDescriptionDefault
env_idYes环境编号
group_idYesAPI分组编号
variable_nameYes变量名,支持英文字母、数字、英文格式的下划线、中划线,必须以英文字母开头, 3 ~ 32个字符。在API定义中等于#Name的值#部分(区分大小写),发布到环境里的API被变量值换。
variable_valueYes变量值支持英文字母、数字、英文格式的下划线、中划线,斜线(/)、点、冒号,1 ~ 255个字符。

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?

With no annotations, the description carries full behavioral burden, yet it discloses none of the mutation traits: required permissions, whether duplicate variable names are rejected or overwritten, idempotency, or the response. The one piece of behavioral context it does provide is that the name corresponds to the #Name# placeholder substituted in published API definitions, which is genuinely useful but insufficient.

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

Conciseness3/5

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

It is a single short sentence with no padding, so nothing is wasteful. However, the sentence's content is background concept rather than front-loaded action, so it is concise but not usefully structured for tool selection.

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?

This is a four-required-parameter mutation with no annotations and no output schema, so the description should say more: conflict behavior on duplicate names, whether the environment must already exist, and any permission requirements. The conceptual sentence leaves the agent without enough to call it safely or predict the outcome.

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 coverage is 100% and each of the four parameters has a detailed description including formats and length limits, so the schema does the heavy lifting. The description adds the substitution semantics between variable name and the #Name# token in API definitions, which is marginal added meaning beyond the schema. 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 explains what environment variables are conceptually (deployment addresses, version numbers differ per environment). It never states that this tool creates one, nor which resource is acted on beyond the name; a reader cannot distinguish it from UpdateEnvironmentVariableV2 or ListEnvironmentVariables based on this text.

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?

No guidance on when to use this tool versus UpdateEnvironmentVariableV2, ListEnvironmentVariables, or the V2 creation sibling. There are no prerequisites, no mention of what happens if the variable name already exists, and no exclusions.

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