Skip to main content
Glama

apig__CreateApi

Creates an API Gateway API by defining client request settings, authentication, and the backend route to HTTP/HTTPS, FunctionGraph, or mock responses.

Instructions

[APIG] 添加一个API,API即一个服务接口,具体的服务能力。API分为两部分,第一部分为面向API使用者的API接口,定义了使用者如何调用这个API。第二部分面向API提供者,由API提供者定义这个API的真实的后端情况,定义了API网关如何去访问真实的后端服务。API的真实后端服务目前支持三种类型:传统的HTTP/HTTPS形式的web后端、函数工作流、MOCK。

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": {
      "auth_type": "<auth_type>",
      "backend_type": "<backend_type>",
      "group_id": "<group_id>",
      "name": "<name>",
      "req_method": "<req_method>",
      "req_protocol": "<req_protocol>",
      "req_uri": "<req_uri>",
      "type": "<type>"
    },
    "name": "apig__CreateApi"
  }
}

Input Schema

NameRequiredDescriptionDefault
corsNo是否支持跨域
nameYesAPI名称长度。
tagsNo标签。
typeYesAPI类型
remarkNoAPI描述。字符长度不超过255
req_uriYesAPI的访问地址
versionNoAPI的版本。字符长度不超过16
auth_optNo认证方式参数
group_idYesAPI所属的分组编号
auth_typeYesAPI的认证方式
func_infoNo
mock_infoNomock后端详情
match_modeNoAPI的匹配方式
req_methodYesAPI的请求方式:GET、POST、PUT、DELETE、HEAD、PATCH、OPTIONS、ANY
req_paramsNoAPI的请求参数列表
backend_apiNoweb后端详情
body_remarkNoAPI请求体描述,可以是请求体示例、媒体类型、参数等信息。字符长度不超过20480
response_idNo分组自定义响应ID
backend_typeYes后端类型
policy_httpsNoweb策略后端列表
policy_mocksNomock策略后端列表
req_protocolYesAPI的请求协议
authorizer_idNo前端自定义认证对象的ID
backend_paramsNoAPI的后端参数列表
policy_functionsNo函数工作流策略后端列表
result_normal_sampleNo正常响应示例,描述API的正常返回信息。字符长度不超过20480
result_failure_sampleNo失败返回示例,描述API的异常返回信息。字符长度不超过20480

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.8/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 disclosure burden for a create/mutation operation. It does not say what happens on duplicate names or URIs, whether the API is immediately published (relevant given the sibling publish/offline tools), what permissions are needed, or what the call returns.

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?

Three sentences with the action front-loaded, but the first clause ("API即一个服务接口...") is filler and the remainder is conceptual teaching rather than operational information an agent needs to fill this large schema. Length is modest, but the space is spent on the wrong content.

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 27-parameter, 8-required, deeply nested creation tool with no annotations and no output schema, the description is far too thin. Nothing explains the front-end vs back-end parameter split, required conditional groups, value constraints, or the result of a successful call.

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 96%, so the baseline is 3, and the description does add some meaning by separating the consumer-facing interface definition from the provider-facing backend definition and naming the three backend kinds. That implicitly maps backend_type to the http/func/mock payloads, but it does not explain the conditional requirements among the 27 parameters (e.g. func_info when backend_type=FUNCTION).

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 opens with a specific verb and resource ("添加一个API" / add an API) and goes on to define what an API consists of, which is a real clarification rather than a restatement of the name. It never distinguishes this tool from the sibling apig__CreateApiV2, so an agent cannot tell from the text which of the two create variants to call.

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 (e.g. that group_id must reference an existing API group), and no exclusions or alternatives. The statement that three backend types are supported is background context, not a decision rule for invoking the tool.

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