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

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Create or update' implies a mutation operation, but the description doesn't specify permissions required, whether it's idempotent, what happens on conflicts, or the response format. This leaves significant gaps for a tool that modifies plugin metadata.

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 extremely concise with just three words, front-loading the key action and resource. There's no wasted language, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

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?

Given the complexity of a mutation tool with no annotations and no output schema, the description is insufficient. It lacks details on behavior, error handling, or usage context, making it incomplete for safe and effective tool invocation in a system with many sibling tools.

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?

Schema description coverage is 100%, so the schema already documents both parameters ('name' and 'metadata') with descriptions. The description adds no additional meaning beyond what's in the schema, such as examples or constraints, but the baseline is 3 since the schema provides adequate documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create or update plugin metadata' clearly states the verb ('create or update') and resource ('plugin metadata'), which is adequate. However, it doesn't differentiate from sibling tools like 'create_plugin_config' or 'get_plugin_metadata', leaving ambiguity about when to use this specific tool versus others that also handle plugins.

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. With siblings like 'create_plugin_config', 'get_plugin_metadata', and 'delete_plugin_metadata', there's no indication of context, prerequisites, or exclusions, making it unclear how this tool fits into the workflow.

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