Skip to main content
Glama

apisix_validate_resource_config

Read-onlyIdempotent

Check if an APISIX resource configuration conforms to its JSON schema, preventing invalid submissions. Supports routes, upstreams, services, and more; requires APISIX 3.5+ but gracefully degrades on older versions.

Instructions

校验资源配置是否符合 JSON schema(需 APISIX ≥3.5)。

仅校验 JSON schema,不校验引用存在性与插件配置合法性。 通过不代表写入必定成功。<3.5 实例上优雅降级。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYes待提交的资源配置体(JSON object),符合对应资源的 JSON schema
resourceYes资源类型:routes / upstreams / services 等
Behavior5/5

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

注释已声明 readOnlyHint/openWorldHint/idempotentHint/destructiveHint,描述额外提供了版本要求(≥3.5)、校验范围限制(不校验引用存在性与插件配置合法性)、通过不代表写入成功,以及 <3.5 优雅降级的行为。这些信息远超注释本身,显著增强行为透明度,且无矛盾。

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

Conciseness5/5

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

描述仅 3 句话,首句即点明核心功能,第二、三句提供必要限制和版本行为,无冗余或重复信息,结构紧凑且重点前置。

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

工具简单且参数完备,注释丰富。描述涵盖了版本要求、校验范围和降级行为,但未说明具体返回值(如成功/失败如何表示)及降级时的确切表现,略有欠缺,但整体足以指导使用。

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 中两个参数(resource、config)均有详细描述,覆盖率达 100%。描述虽提到'资源配置',但未在 schema 基础上增加额外参数级语义,因此按基线给予 3 分。

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

Purpose5/5

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

明确说明工具用于校验资源配置是否符合 JSON schema,动词(校验)+ 对象(资源配置)+ 标准(JSON schema)清晰。与兄弟工具的 get/list 操作区分明显,具有唯一性。

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

Usage Guidelines4/5

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

描述隐含使用场景(提交资源配置前进行预校验),并通过'仅校验 JSON schema,不校验引用存在性与插件配置合法性'和'通过不代表写入必定成功'提示了边界。虽然未显式说明何时使用 vs 替代工具,但兄弟工具均无校验功能,上下文足够清晰。

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhouweico/mcp-apisix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server