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");
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an update operation, implying mutation, but doesn't describe what happens on success/failure, whether changes are partial or complete, permission requirements, or side effects. For a mutation tool with zero annotation coverage, this leaves significant gaps.

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 communicates the core purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after the update, what attributes can be modified, error conditions, or how this differs from creation operations. Given the complexity of updating a consumer group configuration, more context is needed.

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 schema description coverage is 100%, so parameters 'id' and 'consumerGroup' are well-documented in the schema. The description adds minimal value beyond the schema by implying these update 'specific attributes' but doesn't provide additional context about parameter relationships or usage patterns.

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 action ('Update') and resource ('specific attributes of an existing consumer group'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'create_consumer_group' or other update tools, which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'create_consumer_group' or other update operations. It mentions 'existing consumer group' which implies a prerequisite, but offers no explicit usage context, exclusions, or comparisons to sibling tools.

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