Skip to main content
Glama

apig__ExportApiDefinitionsV2

Exports API definitions for a specified API group in Swagger/OpenAPI JSON or YAML format, enabling backup, migration, and versioning of gateway APIs.

Instructions

[APIG] 导出分组下API的定义信息。导出文件内容符合swagger标准规范,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": {
      "env_id": "<env_id>",
      "group_id": "<group_id>",
      "instance_id": "<instance_id>",
      "project_id": "<project_id>"
    },
    "name": "apig__ExportApiDefinitionsV2"
  }
}

Input Schema

NameRequiredDescriptionDefault
apisNo导出的API ID列表
typeNo导出的API定义的格式json
defineNo导出API的定义范围:spec
env_idYesAPI分组发布的环境ID
versionNo导出的API定义版本,默认为当前时间
group_idYesAPI分组ID
project_idYes项目ID,获取方式请参见[获取项目ID](apig-api-180713009.xml)。
instance_idYes实例ID,在API网关控制台的“实例信息”中获取。
oas_versionNoOpenAPI版本2.0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

没有提供任何 annotations,因此描述需要承担该工具的行为披露责任。描述确实增加了实际价值:说明导出内容是符合 Swagger 规范的文档,并提到 API Gateway 的自定义扩展字段,这可以提示调用方该文件并非纯 OpenAPI。但它从未说明该工具返回文件内容还是下载链接,也没有说明它是否同步执行(而异步兄弟工具暗示了这一点),更没有说明执行它需要或会消耗哪些权限。

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?

两个正文句子,且范围说明放在最前面,没有冗余表述。用户指南交叉引用略有多余,但描述了 swagger 合规性和自定义扩展字段,不过与一次调用所需的核心信息相比,这些内容略显次要。

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?

对于一个包含 9 个参数、没有 output schema 的导出工具,描述覆盖了总体用途和输出格式,但还不足以让 agent 有把握地调用:它没有说明同步与异步的区别,没有说明输出是文档本身还是下载引用,也没有说明当 `define` 选择 `proxy` 或 `all` 时返回内容会有什么不同。

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 描述覆盖率是 100%,有 9 个参数、其中 3 个是枚举,因此每个参数的含义和取值范围都已经在 schema 中记录。描述没有补充任何参数级语义(例如 `define` 各取值范围在导出内容上的含义,或 `version` 的默认取值行为),所以此处适用 baseline 3。

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?

该描述明确说明了一个具体的动词和资源(“导出分组下API的定义信息”),并将范围限定为某个 API group,因此 agent 无需查看 schema 就能知道该工具的作用。但它没有与兄弟工具 apig__ExportApiDefinitionsAsync 区分开;当同一资源同时存在同步和异步导出时,这一区分最为有用。

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?

描述中没有说明何时使用该工具,而不是异步变体,也没有说明前置条件,例如分组必须已发布,或 env_id、instance_id 必须对应哪个发布环境。唯一通过“一个条件”隐含的指引是,在扩展字段方面参考用户指南,但那是文档指引,不是使用指引。

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