Skip to main content
Glama
redis

Redis Cloud API MCP Server

Official
by redis

delete-essential-subscription

Remove an essential subscription using its ID to manage Redis Cloud resources efficiently. This action ensures proper resource allocation and organization within the Redis Cloud API MCP Server.

Instructions

Delete an essential subscription by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriptionIdYesSubscription ID

Implementation Reference

  • Handler function that executes the deletion of an essential subscription by ID. Extracts and validates subscriptionId, calls the service method deleteSubscriptionById1, and returns the result.
    "delete-essential-subscription": async (request) => {
      const { subscriptionId } = extractArguments<{ subscriptionId: number }>(
        request,
      );
    
      // Validate input
      validateToolInput(
        subscriptionIdSchema,
        { subscriptionId },
        "Essential subscription ID",
      );
    
      const result = await executeApiCall(
        () =>
          SubscriptionsEssentialsService.deleteSubscriptionById1(subscriptionId),
        `Delete essential subscription ${subscriptionId}`,
      );
      return createToolResponse(result);
    },
  • Tool schema definition specifying the input schema requiring a subscriptionId (number >=1).
    const DELETE_ESSENTIAL_SUBSCRIPTION_TOOL: Tool = {
      name: "delete-essential-subscription",
      description: "Delete an essential subscription by ID",
      inputSchema: {
        type: "object",
        properties: {
          subscriptionId: {
            type: "number",
            description: "Subscription ID",
            min: 1,
          },
        },
        required: ["subscriptionId"],
      },
    };
  • Registration of the delete-essential-subscription tool as part of the SUBSCRIPTIONS_ESSENTIALS_TOOLS array export.
    export const SUBSCRIPTIONS_ESSENTIALS_TOOLS = [
      GET_ESSENTIAL_SUBSCRIPTIONS_TOOL,
      GET_ESSENTIAL_SUBSCRIPTION_BY_ID_TOOL,
      CREATE_ESSENTIAL_SUBSCRIPTION_TOOL,
      DELETE_ESSENTIAL_SUBSCRIPTION_TOOL,
      GET_ESSENTIALS_PLANS_TOOL,
    ];
  • Export of handlers object including the delete-essential-subscription handler.
    export const SUBSCRIPTIONS_ESSENTIALS_HANDLERS: ToolHandlers = {
      "get-essential-subscriptions": async (request) => {
        const { page = 0, size = DEFAULT_PAGE_SIZE } = extractArguments<{
          page?: number;
          size?: number;
        }>(request);
    
        // Validate input
        validateToolInput(
          getSubscriptionsSchema,
          { page, size },
          "Essential subscriptions request",
        );
    
        const response = await executeApiCall(
          () => SubscriptionsEssentialsService.getAllSubscriptions1(),
          "Get essential subscriptions",
        );
    
        const allSubscriptions = response.subscriptions || [];
    
        // Calculate pagination
        const startIndex = page * size;
        const endIndex = startIndex + size;
        const paginatedSubscriptions = allSubscriptions.slice(startIndex, endIndex);
    
        const pageable: Pageable = {
          page,
          size,
        };
    
        return createToolResponse(
          createPage(paginatedSubscriptions, pageable, allSubscriptions.length),
        );
      },
    
      "get-essential-subscription-by-id": async (request) => {
        const { subscriptionId } = extractArguments<{ subscriptionId: number }>(
          request,
        );
    
        // Validate input
        validateToolInput(
          subscriptionIdSchema,
          { subscriptionId },
          "Essential subscription ID",
        );
    
        const subscription = await executeApiCall(
          () => SubscriptionsEssentialsService.getSubscriptionById1(subscriptionId),
          `Get essential subscription ${subscriptionId}`,
        );
        return createToolResponse(subscription);
      },
    
      "delete-essential-subscription": async (request) => {
        const { subscriptionId } = extractArguments<{ subscriptionId: number }>(
          request,
        );
    
        // Validate input
        validateToolInput(
          subscriptionIdSchema,
          { subscriptionId },
          "Essential subscription ID",
        );
    
        const result = await executeApiCall(
          () =>
            SubscriptionsEssentialsService.deleteSubscriptionById1(subscriptionId),
          `Delete essential subscription ${subscriptionId}`,
        );
        return createToolResponse(result);
      },
    
      "get-essentials-plans": async (request) => {
        const {
          provider,
          redisFlex,
          page = 0,
          size = DEFAULT_PAGE_SIZE,
        } = extractArguments<{
          provider: "AWS" | "GCP" | "AZURE";
          redisFlex: boolean;
          page?: number;
          size?: number;
        }>(request);
    
        // Validate input
        validateToolInput(
          getPlansSchema,
          { provider, redisFlex, page, size },
          "Essential plans request",
        );
    
        const response = await executeApiCall(
          () =>
            SubscriptionsEssentialsService.getAllFixedSubscriptionsPlans(
              provider,
              redisFlex,
            ),
          `Get essential plans for ${provider}`,
        );
    
        const allPlans = response.plans.map((plan) => ({
          id: plan.id,
          name: plan.name,
          size: plan.size,
          sizeMeasurementUnit: plan.sizeMeasurementUnit,
          regionId: plan.regionId,
          price: plan.price,
          priceCurrency: plan.priceCurrency,
          pricePeriod: plan.pricePeriod,
        }));
    
        // Calculate pagination
        const startIndex = page * size;
        const endIndex = startIndex + size;
        const paginatedPlans = allPlans.slice(startIndex, endIndex);
    
        const pageable: Pageable = {
          page,
          size,
        };
    
        return createToolResponse(
          createPage(paginatedPlans, pageable, allPlans.length),
        );
      },
    
      "create-essential-subscription": async (request) => {
        const { name, planId, paymentMethod, paymentMethodId } = extractArguments<{
          name: string;
          planId: number;
          paymentMethod?: FixedSubscriptionCreateRequest["paymentMethod"];
          paymentMethodId?: number;
        }>(request);
    
        // Validate input
        validateToolInput(
          createSubscriptionSchema,
          { name, planId, paymentMethod, paymentMethodId },
          "Create essential subscription",
        );
    
        // If paymentMethod is credit-card, paymentMethodId is required
        if (paymentMethod === "credit-card" && !paymentMethodId) {
          throw new Error(
            "paymentMethodId is required when paymentMethod is credit-card",
          );
        }
    
        const reqBody: FixedSubscriptionCreateRequest = {
          name,
          planId,
          ...(paymentMethod && { paymentMethod }),
          ...(paymentMethodId && { paymentMethodId }),
        };
    
        const result = await executeApiCall(
          () => SubscriptionsEssentialsService.createSubscription1(reqBody),
          "Create essential subscription",
        );
        return createToolResponse(result);
      },
    };
Behavior2/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. While 'Delete' implies a destructive mutation, the description doesn't specify whether this action is reversible, what permissions are required, what happens to associated data, or any rate limits. For a destructive tool with zero annotation coverage, this is a significant gap in safety and operational context.

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 with zero waste. It's appropriately sized for a simple tool and front-loads the core action and resource without unnecessary elaboration.

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?

Given the tool's destructive nature, lack of annotations, and absence of an output schema, the description is incomplete. It doesn't address critical context such as the irreversible nature of deletion, error conditions, or what happens post-deletion (e.g., confirmation message or status). For a mutation tool with no structured safety hints, this leaves significant gaps for an AI agent.

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 schema description coverage is 100%, with the single parameter 'subscriptionId' fully documented in the schema. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't clarify format, source, or validation rules). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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 ('Delete') and target resource ('an essential subscription by ID'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from potential sibling deletion tools (none exist in the provided list, but the description doesn't explicitly state this uniqueness).

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. It doesn't mention prerequisites (e.g., needing the subscription ID from a get operation), consequences of deletion, or when not to use it (e.g., for pro subscriptions). With siblings like 'get-essential-subscription-by-id' and 'get-essential-subscriptions', the description should ideally reference these for obtaining the required ID.

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

Related 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/redis/mcp-redis-cloud'

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