Skip to main content
Glama

apisix_list_routes

Read-onlyIdempotent

Lists Apache APISIX routes, filtering by name, URI, label, service ID, or upstream ID. Includes pagination and field selection for efficient configuration queries.

Instructions

查询路由列表。

支持按 name / uri / label 过滤(v3 格式原生支持),以及 service_id / upstream_id 引用过滤(需 APISIX ≥3.13)。v2 格式下过滤参数被静默忽略,返回结果中会显式告知。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriNo按 uri 过滤(v3 格式生效)
nameNo按 name 过滤(v3 格式生效)
pageNo页码,从 1 开始
labelNo按 label 过滤(v3 格式生效)
detailNo返回完整配置(跳过投影)
fieldsNo指定字段(JSON 数组),覆盖默认投影;detail=true 时忽略
page_sizeNo每页条数,有效区间 [10, 500]
service_idNo按 service_id 过滤(引用过滤,≥3.13)
upstream_idNo按 upstream_id 过滤(引用过滤,≥3.13)
Behavior5/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior. The description adds valuable behavioral context: in v2 format, filter parameters are silently ignored, and the return result will explicitly indicate this. It also notes that service_id/upstream_id filtering requires APISIX ≥3.13, which is non-obvious and beyond what annotations or the schema convey.

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?

The description is concise and well-structured: a one-line core purpose, followed by filtering capabilities and a critical version caveat. Every sentence adds value with no fluff or redundancy, and essential information is front-loaded.

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?

For a list tool with 9 optional parameters and no output schema, the description covers the primary purpose, filtering options, version constraints, and a key edge case about v2 behavior. It does not describe the return format, but pagination and projection parameters are documented in the schema, and the read-only nature is clear from annotations and description.

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?

The input schema has 100% description coverage across all 9 parameters, so the schema already documents each parameter clearly. The description synthesizes the filter parameters into logical groups (v3 native vs reference filtering) and adds the v2 caveat, but this does not significantly extend the per-parameter meaning.

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?

The description opens with '查询路由列表' (query route list), clearly identifying the action (list) and resource (routes). It goes beyond a generic statement by enumerating supported filter criteria and version-specific behavior, which distinguishes it from sibling tools like apisix_get_route that retrieve a single route.

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

Usage Guidelines3/5

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

The description implies usage by stating the tool lists routes and supports various filters, but it does not explicitly compare with alternatives or state when to prefer this over apisix_get_route. It does provide a version constraint for reference filtering, which offers some guidance, but no explicit exclusions.

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