Skip to main content
Glama

get_all_plugin_names

Retrieve a list of all available plugin names from APISIX-MCP, enabling integration and management of plugins for enhanced API gateway functionality.

Instructions

Get all plugin names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_all_plugin_names' MCP tool. It executes by making an HTTP GET request to the APISIX admin API endpoint `/plugins/list` via the makeAdminAPIRequest helper.
    server.tool("get_all_plugin_names", "Get all plugin names", async () => {
      return await makeAdminAPIRequest(`/plugins/list`);
    });
  • Helper utility function that performs authenticated HTTP requests to the APISIX admin API and formats the response as MCP CallToolResult. Used by the get_all_plugin_names handler and other tools.
    export async function makeAdminAPIRequest(
      path: string,
      method: string = "GET",
      data?: object
    ): Promise<CallToolResult> {
      const baseUrl = `${APISIX_SERVER_HOST}:${APISIX_ADMIN_API_PORT}${APISIX_ADMIN_API_PREFIX}`;
      const url = `${baseUrl}${path}`;
    
      try {
        const response = await axios({
          method,
          url,
          data,
          headers: {
            "X-API-KEY": APISIX_ADMIN_KEY,
            "Content-Type": "application/json",
          },
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          console.error(`Request failed: ${method} ${url}`);
          console.error(
            `Status: ${error.response?.status}, Error: ${error.message}`
          );
    
          if (error.response?.data) {
            try {
              const stringifiedData = JSON.stringify(error.response.data);
              console.error(`Response data: ${stringifiedData}`);
            } catch {
              console.error(`Response data: [Cannot parse as JSON]`);
            }
          }
    
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  `Status: ${error.response?.status}\nMessage: ${error.message}
    Data:\n${JSON.stringify(error.response?.data || {}, null, 2)}`,
                  null,
                  2
                ),
              },
            ],
          };
        } else {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: JSON.stringify(error, null, 2),
              },
            ],
          };
        }
      }
    }
  • Registers the 'get_all_plugin_names' tool with the MCP server using server.tool(), providing name, description, and handler function.
    server.tool("get_all_plugin_names", "Get all plugin names", async () => {
      return await makeAdminAPIRequest(`/plugins/list`);
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Get all plugin names' implies a read operation but doesn't specify if it requires authentication, has rate limits, returns a list format, or handles errors. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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 'Get all plugin names' is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple tool with no parameters. Every word earns its place without redundancy.

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?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on return format, error handling, or usage context. For a read-only tool with no structured output, more completeness would be beneficial, but it meets the basic threshold.

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?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics beyond what the schema provides. Baseline for 0 parameters is 4, as the description appropriately doesn't discuss non-existent parameters.

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 'Get all plugin names' clearly states the verb ('Get') and resource ('plugin names'), with 'all' indicating comprehensive scope. It distinguishes from siblings like 'get_plugin_metadata' or 'get_plugin_schema' by focusing specifically on names only. However, it doesn't explicitly contrast with siblings, keeping it at 4 rather than 5.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_plugin_metadata' and 'get_plugin_schema', there's no indication of whether this tool is for listing names only versus retrieving detailed metadata. No explicit when/when-not or alternative recommendations are included.

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

Related 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/api7/apisix-mcp'

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