Skip to main content
Glama

update_consumer_group

Modify a consumer group by updating its ID, labels, plugins, or description. Simplify configuration adjustments via the APISIX-MCP server interface.

Instructions

Update specific attributes of an existing consumer group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
consumerGroupNoconsumer group configuration object
idNoconsumer group ID

Implementation Reference

  • Registers the update_consumer_group tool using server.tool(), including the tool name, description, input schema, and inline handler function that sends a PATCH request to the admin API.
    server.tool( "update_consumer_group", "Update specific attributes of an existing consumer group", UpdateConsumerGroupSchema.shape, async (args) => { return await makeAdminAPIRequest(`/consumer_groups/${args.id}`, "PATCH", args.consumerGroup); } );
  • The handler function that executes the tool logic: constructs the API endpoint `/consumer_groups/${args.id}` and sends a PATCH request with the consumerGroup partial data using makeAdminAPIRequest.
    async (args) => { return await makeAdminAPIRequest(`/consumer_groups/${args.id}`, "PATCH", args.consumerGroup); }
  • Zod schema defining the input for the tool: required id (string) and optional partial consumerGroup configuration.
    export const UpdateConsumerGroupSchema = createNullablePatchSchema(z.object({ id: z.string().describe("consumer group ID"), consumerGroup: ConsumerGroupSchema.partial(), }));
  • src/index.ts:29-29 (registration)
    Top-level call to setupConsumerGroupTools on the MCP server, which registers the consumer group tools including update_consumer_group.
    setupConsumerGroupTools(server);
  • Base schema for consumer group configuration, used partially in UpdateConsumerGroupSchema.
    export const ConsumerGroupSchema = z .object({ labels: z .record(z.string(), z.string()) .optional() .describe("consumer group labels"), plugins: PluginSchema.optional().describe("consumer group plugins"), desc: z.string().optional().describe("consumer group description"), }) .passthrough() .describe("consumer group configuration object");

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