Skip to main content
Glama

delete-category

Remove a category from the PI Dashboard by specifying its ID to manage and organize resources effectively.

Instructions

Delete a category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCategory ID

Implementation Reference

  • The asynchronous handler function that executes the delete-category tool logic. It performs an authenticated DELETE request to `/categories/${id}` and returns a success or error response.
    }, async ({ id }) => { try { await authenticatedRequest(`/categories/${id}`, "DELETE"); return { content: [{ type: "text", text: `Category with ID ${id} successfully deleted.` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error deleting category: ${getErrorMessage(error)}` }] }; }
  • Zod input schema defining the required 'id' parameter as a number with description.
    id: z.number().describe("Category ID")
  • build/index.js:721-739 (registration)
    Registration of the 'delete-category' tool using server.tool(), including name, description, schema, and inline handler function.
    server.tool("delete-category", "Delete a category", { id: z.number().describe("Category ID") }, async ({ id }) => { try { await authenticatedRequest(`/categories/${id}`, "DELETE"); return { content: [{ type: "text", text: `Category with ID ${id} successfully deleted.` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error deleting category: ${getErrorMessage(error)}` }] }; } });

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/mingzilla/pi-api-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server