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)}` }]
            };
        }
    });
Behavior1/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. 'Delete a category' implies a destructive mutation, but it doesn't describe whether deletion is permanent or reversible, what happens to associated objects (e.g., from 'list-category-objects'), required permissions, or error conditions. This leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While concise with only three words, this is under-specification rather than effective brevity. The description fails to provide necessary context about the tool's purpose or usage, making it inefficient despite its short length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a destructive mutation tool with no annotations and no output schema, the description is completely inadequate. It doesn't explain what 'delete' entails, what the tool returns, how it interacts with sibling tools, or any behavioral constraints, leaving the agent with insufficient information to use it correctly.

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 description adds no parameter information beyond what the schema provides. However, schema description coverage is 100% (the 'id' parameter is fully documented), so the baseline score of 3 is appropriate. The description doesn't compensate for any gaps, but none exist in the schema.

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

Purpose2/5

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

The description 'Delete a category' is a tautology that merely restates the tool name, providing no additional specificity. It doesn't clarify what type of category (e.g., product category, content category) or what system it operates on, nor does it distinguish this tool from sibling deletion tools like 'delete-chart' beyond the obvious resource difference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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. It doesn't mention prerequisites (e.g., authentication), when deletion is appropriate versus updating, or how it relates to sibling tools like 'create-category', 'update-category', or 'list-categories'.

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

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