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);

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