Skip to main content
Glama

create_or_update_plugin_metadata

Manage plugin configurations by creating or updating metadata in the APISIX-MCP server, enabling control over plugin functionality and behavior.

Instructions

Create or update plugin metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metadataYesplugins configuration
nameYesplugins name

Implementation Reference

  • Registration of the create_or_update_plugin_metadata tool on the MCP server, including tool name, description, input schema reference, and inline handler function that sends a PUT request to the admin API with plugin name and metadata.
    server.tool( "create_or_update_plugin_metadata", "Create or update plugin metadata", CreateOrUpdatePluginMetadataSchema.shape, async (args) => { return await makeAdminAPIRequest(`/plugin_metadata/${args.name}`, "PUT", args.metadata); } );
  • Zod schema defining the input for the tool: plugin name and metadata object.
    export const CreateOrUpdatePluginMetadataSchema = z.object({ name: z.string().describe("plugins name"), metadata: PluginSchema, });
  • Supporting schema for plugin metadata configuration, used within CreateOrUpdatePluginMetadataSchema.
    export const PluginSchema = z.object({ _meta: z.object({ disable: z.boolean().default(false).describe("control whether the plugin is enabled"), }).optional(), }).passthrough().describe("plugins configuration");
  • Inline handler function executing the tool logic by making an admin API PUT request.
    async (args) => { return await makeAdminAPIRequest(`/plugin_metadata/${args.name}`, "PUT", args.metadata); }

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