Skip to main content
Glama

delete_resource

Remove a specific resource by ID and type from the APISIX-MCP server, supporting routes, services, upstreams, and other configurations.

Instructions

Delete a resource by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesresource id
typeYesresource type

Implementation Reference

  • The inline handler function for the 'delete_resource' tool, which performs a DELETE request to the admin API for the specified resource type and ID.
    server.tool("delete_resource", "Delete a resource by ID", DeleteResourceSchema.shape, async (args) => { return await makeAdminAPIRequest(`/${args.type}/${args.id}`, "DELETE"); });
  • Zod schema for validating the input arguments of the 'delete_resource' tool, requiring 'id' (string) and 'type' (resource type enum).
    export const DeleteResourceSchema = z.object({ id: z.string().describe("resource id"), type: ResourceTypeSchema.describe("resource type"), });
  • Registration of the 'delete_resource' tool on the MCP server, including description, input schema, and handler.
    server.tool("delete_resource", "Delete a resource by ID", DeleteResourceSchema.shape, async (args) => { return await makeAdminAPIRequest(`/${args.type}/${args.id}`, "DELETE"); });

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