Skip to main content
Glama
plutzilla

Omnisend MCP Server

deleteProduct

Remove products from the Omnisend catalog using unique identifiers to maintain accurate product listings and inventory management.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'deleteProduct' MCP tool. It invokes the underlying deleteProduct API helper with the provided productId and returns a success or error message.
    async (args) => {
      try {
        const success = await deleteProduct(args.productId);
        
        return {
          content: [
            { 
              type: "text", 
              text: success ? "Product deleted successfully" : "Failed to delete product" 
            }
          ]
        };
      } catch (error) {
        if (error instanceof Error) {
          return { content: [{ type: "text", text: `Error: ${error.message}` }] };
        }
        return { content: [{ type: "text", text: "An unknown error occurred" }] };
      }
    }
  • The input schema definition for the 'deleteProduct' tool, specifying the required 'productId' parameter.
    {
      additionalProperties: false,
      properties: {
        productId: { description: "Product ID", type: "string" }
      },
      required: ["productId"],
      type: "object"
    },
  • The registration of the 'deleteProduct' tool using server.tool(), including name, description, schema, and handler.
    server.tool(
      "deleteProduct",
      "Remove a product from the Omnisend catalog by its unique identifier.",
      {
        additionalProperties: false,
        properties: {
          productId: { description: "Product ID", type: "string" }
        },
        required: ["productId"],
        type: "object"
      },
      async (args) => {
        try {
          const success = await deleteProduct(args.productId);
          
          return {
            content: [
              { 
                type: "text", 
                text: success ? "Product deleted successfully" : "Failed to delete product" 
              }
            ]
          };
        } catch (error) {
          if (error instanceof Error) {
            return { content: [{ type: "text", text: `Error: ${error.message}` }] };
          }
          return { content: [{ type: "text", text: "An unknown error occurred" }] };
        }
      }
    );
  • Helper function that performs the actual DELETE API call to Omnisend's /products/{productId} endpoint and returns true if status is 204.
    export const deleteProduct = async (productId: string): Promise<boolean> => {
      try {
        const response = await omnisendApi.delete(`/products/${productId}`);
        return response.status === 204;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Error deleting product: ${error.message}`);
        } else {
          throw new Error('Unknown error occurred when deleting product');
        }
      }
    }; 
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without disclosing behavioral traits like whether deletion is permanent, requires specific permissions, triggers side effects (e.g., removing associated data), or provides confirmation responses. It lacks critical details for a destructive operation.

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, well-structured sentence that efficiently conveys the core action and target without redundancy. It is front-loaded with the main purpose and uses no extra words, making it highly concise and effective.

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 fails to address key aspects like return values (e.g., success/failure indicators), error handling, or implications of deletion, leaving significant gaps for an AI agent to understand the tool's behavior fully.

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 appropriately does not add parameter details, maintaining focus on the tool's purpose. Baseline is 4 for zero parameters, as it avoids unnecessary information.

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

Purpose5/5

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

The description clearly states the specific action ('Remove'), target resource ('product from the Omnisend catalog'), and mechanism ('by its unique identifier'). It distinguishes from siblings like 'deleteCategory' by specifying the resource type and from 'replaceProduct' by indicating permanent removal rather than replacement.

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 'replaceProduct' or 'updateProduct', nor does it mention prerequisites such as needing the product's ID or confirmations for deletion. It only states what the tool does without contextual usage information.

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