Skip to main content
Glama

apig__AddCustomIngressPort

Adds a custom inbound port to an API Gateway instance and assigns it HTTP or HTTPS protocol, with one protocol allowed per port in the instance.

Instructions

[APIG] 新增实例的自定义入方向端口,在同个实例中,一个端口仅能支持一种协议。

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": {
      "ingress_port": "<ingress_port>",
      "instance_id": "<instance_id>",
      "project_id": "<project_id>",
      "protocol": "<protocol>"
    },
    "name": "apig__AddCustomIngressPort"
  }
}

Input Schema

NameRequiredDescriptionDefault
protocolYes实例自定义入方向端口协议。
project_idYes项目ID,获取方式请参见[获取项目ID](apig-api-180713009.xml)。
instance_idYes实例ID,在API网关控制台的“实例信息”中获取。
ingress_portYes实例自定义入方向端口,支持的端口范围为1024~49151。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.3/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 usefully discloses a cross-object constraint — one protocol per port per instance, implying conflicts are rejected — but says nothing about permissions, idempotency, port-count limits, or whether existing mappings are affected.

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 with the action first and the key constraint second; nothing is padded. The '[APIG]' tag is minor noise but the rest earns its place.

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 a four-parameter mutation tool with no annotations and no output schema, the description covers purpose and one constraint but leaves permission requirements, failure/conflict behavior, and post-add effects unexplained. Adequate to attempt a call, not to predict its outcome.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter, including the 1024–49151 range and the HTTP/HTTPS enum, is documented in the schema itself, so the baseline would be 3. The description adds a genuine semantic relation between ingress_port and protocol that the schema alone does not express, which lifts it slightly.

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 names a specific verb and resource: adding a custom ingress port to an instance ('新增实例的自定义入方向端口'). That is enough to distinguish it from DeleteCustomIngressPort and ListCustomIngressPorts, but it never names a sibling or states the resulting scope in a way that would route an agent explicitly.

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 prerequisite (an existing instance_id/project_id), and no indication of quota limits or what to do when the port is already taken. The one rule it gives ('a port can only support one protocol in the same instance') is a constraint, not guidance on choosing this tool over alternatives.

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