Skip to main content
Glama

get_plugin_schema

Retrieve schema details for all plugins or a specific plugin by name in APISIX-MCP, enabling precise configuration and integration with supported plugin types.

Instructions

Get all plugins schema or a specific plugin schema by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesplugins name
typeNoplugins type

Implementation Reference

  • The asynchronous handler function that implements the core logic of the 'get_plugin_schema' tool. It constructs a query based on optional 'type' parameter and fetches either a specific plugin schema by name or all schemas filtered by type via the admin API.
    async (args) => {
      let query = "";
      if (args.type) {
        query = `?type=${args.type}`;
      }
      if (args.name) {
        return await makeAdminAPIRequest(`/plugins/${args.name}`);
      } else {
        return await makeAdminAPIRequest(`/plugins${query}`);
      }
    }
  • Zod input schema definition for the 'get_plugin_schema' tool, defining optional 'name' (string) and 'type' (enum: 'http' or 'stream') parameters.
    export const GetPluginSchemaSchema = z.object({
      name: z.string().describe("plugins name"),
      type: z.enum(["http", "stream"]).optional().describe("plugins type"),
    });
  • The server.tool() call that registers the 'get_plugin_schema' tool with the MCP server, including name, description, input schema, and inline handler function.
    server.tool(
      "get_plugin_schema",
      "Get all plugins schema or a specific plugin schema by name",
      GetPluginSchemaSchema.shape,
      async (args) => {
        let query = "";
        if (args.type) {
          query = `?type=${args.type}`;
        }
        if (args.name) {
          return await makeAdminAPIRequest(`/plugins/${args.name}`);
        } else {
          return await makeAdminAPIRequest(`/plugins${query}`);
        }
      }
    );
  • src/index.ts:30-30 (registration)
    Invocation of setupPluginTools which registers the 'get_plugin_schema' tool (among others) with the main MCP server instance.
    setupPluginTools(server);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't mention whether this is a read-only operation, what permissions are required, how results are formatted, or any rate limits. This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 tool with no annotations and no output schema, the description is incomplete. It doesn't explain what a 'plugin schema' contains, how results are structured, or any behavioral traits like error handling. Given the complexity implied by sibling tools, more context is needed for effective use.

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 description mentions retrieving schema 'by name', which aligns with the required 'name' parameter, but doesn't explain the optional 'type' parameter or its enum values. With 100% schema description coverage, the schema already documents both parameters, so the description adds minimal value beyond the schema.

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 clearly states the verb 'Get' and the resource 'plugins schema', specifying it can retrieve all schemas or a specific one by name. However, it doesn't differentiate from sibling tools like 'get_all_plugin_names' or 'get_plugin_metadata', which reduces clarity about when to use each.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_all_plugin_names' or 'get_plugin_metadata'. The description implies usage for retrieving schema information but offers no context about prerequisites, exclusions, or specific scenarios.

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