Skip to main content
Glama
plutzilla

Omnisend MCP Server

deleteCategory

Remove a product category from the Omnisend catalog using its unique identifier to maintain organized product listings.

Instructions

Remove a product category from the Omnisend catalog by its unique identifier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the deleteCategory tool: invokes the API deleteCategory with the provided categoryId and returns a textual success or error response.
      async (args) => {
        try {
          const success = await deleteCategory(args.categoryId);
          
          return {
            content: [
              { 
                type: "text", 
                text: success ? "Category deleted successfully" : "Failed to delete category" 
              }
            ]
          };
        } catch (error) {
          if (error instanceof Error) {
            return { content: [{ type: "text", text: `Error: ${error.message}` }] };
          }
          return { content: [{ type: "text", text: "An unknown error occurred" }] };
        }
      }
    );
  • Input schema for the deleteCategory tool, specifying the required categoryId parameter.
    {
      additionalProperties: false,
      properties: {
        categoryId: { description: "Category ID", type: "string" }
      },
      required: ["categoryId"],
      type: "object"
    },
  • Registration of the deleteCategory MCP tool using server.tool(), including name, description, input schema, and handler function.
      "deleteCategory",
      "Remove a product category from the Omnisend catalog by its unique identifier.",
      {
        additionalProperties: false,
        properties: {
          categoryId: { description: "Category ID", type: "string" }
        },
        required: ["categoryId"],
        type: "object"
      },
      async (args) => {
        try {
          const success = await deleteCategory(args.categoryId);
          
          return {
            content: [
              { 
                type: "text", 
                text: success ? "Category deleted successfully" : "Failed to delete category" 
              }
            ]
          };
        } catch (error) {
          if (error instanceof Error) {
            return { content: [{ type: "text", text: `Error: ${error.message}` }] };
          }
          return { content: [{ type: "text", text: "An unknown error occurred" }] };
        }
      }
    );
  • API helper function implementing the core delete logic by sending a DELETE request to the Omnisend /product-categories/{categoryId} endpoint.
    export const deleteCategory = async (categoryId: string): Promise<boolean> => {
      try {
        const response = await omnisendApi.delete(`/product-categories/${categoryId}`);
        return response.status === 204;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Error deleting category: ${error.message}`);
        } else {
          throw new Error('Unknown error occurred when deleting category');
        }
      }
    }; 
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a destructive operation ('Remove') but doesn't specify if deletion is permanent, reversible, or requires specific permissions. No information on rate limits, error handling, or side effects is included, leaving significant gaps for a mutation tool.

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 front-loads the key action and resource. There is no wasted verbiage, and it directly communicates the tool's function without unnecessary details, making it highly concise and well-structured.

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 destructive tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., permanence, permissions), response format, or error conditions. Given the complexity of a delete operation, more context is needed to ensure safe and correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description mentions 'by its unique identifier,' which aligns with the schema's lack of properties, suggesting the identifier might be handled elsewhere (e.g., in the URL). This adds minimal but appropriate context given the empty schema.

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 ('Remove') and resource ('product category from the Omnisend catalog'), making the purpose immediately understandable. It distinguishes from siblings like 'deleteProduct' by specifying the resource type. However, it doesn't explicitly contrast with 'updateCategory' or 'getCategory' for full differentiation.

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 'updateCategory' or 'deleteProduct', nor does it mention prerequisites such as needing the category's unique identifier. It simply states what the tool does without contextual usage instructions.

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/plutzilla/omnisend-mcp'

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