update_plugin_config
Modify plugin configurations in APISIX-MCP by updating descriptions, labels, and plugin settings to customize API gateway behavior.
Instructions
Update a plugin config
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | plugin config ID | |
| plugins | No |
Implementation Reference
- src/tools/plugin.ts:42-44 (handler)Registers and implements the handler for the update_plugin_config tool. The inline async function executes the tool logic by making a PATCH request to the admin API at `/plugin_configs/${args.id}` with the provided arguments.server.tool("update_plugin_config", "Update a plugin config", UpdatePluginConfigSchema.shape, async (args) => { return await makeAdminAPIRequest(`/plugin_configs/${args.id}`, "PATCH", args); });
- src/schemas/plugin.ts:49-52 (schema)Zod schema defining the input parameters for the update_plugin_config tool, including the config ID and plugins configuration (patchable).export const UpdatePluginConfigSchema = createNullablePatchSchema(z.object({ id: z.string().describe("plugin config ID"), plugins: PluginConfigSchema, }));
- src/tools/plugin.ts:42-44 (registration)Location where the update_plugin_config tool is registered with the MCP server using server.tool(), specifying name, description, input shape, and handler.server.tool("update_plugin_config", "Update a plugin config", UpdatePluginConfigSchema.shape, async (args) => { return await makeAdminAPIRequest(`/plugin_configs/${args.id}`, "PATCH", args); });