Skip to main content
Glama
redis

Redis Cloud API MCP Server

Official
by redis

create-essential-subscription

Set up a new essential subscription for Redis Cloud by specifying a name, payment method, and plan ID. Returns a TASK ID to monitor subscription creation progress.

Instructions

Create a new essential subscription. Returns a TASK ID that can be used to track the status of the subscription creation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSubscription name
paymentMethodNoPayment methodcredit-card
paymentMethodIdNoPayment method ID
planIdYesPlan ID. The plan ID can be taken from /fixed/plans

Implementation Reference

  • Handler function that extracts and validates input parameters (name, planId, paymentMethod, paymentMethodId), constructs the request body, calls SubscriptionsEssentialsService.createSubscription1 via executeApiCall, and returns the response.
    "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);
    },
  • Tool schema definition for create-essential-subscription, including input schema with properties for name, planId, paymentMethod, paymentMethodId, and required fields.
    const CREATE_ESSENTIAL_SUBSCRIPTION_TOOL: Tool = {
      name: "create-essential-subscription",
      description:
        "Create a new essential subscription. Returns a TASK ID that can be used to track the status of the subscription creation",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Subscription name",
          },
          planId: {
            type: "number",
            description: "Plan ID. The plan ID can be taken from /fixed/plans",
          },
          paymentMethod: {
            type: "string",
            description: "Payment method",
            enum: ["credit-card", "marketplace"],
            default: "credit-card",
          },
          paymentMethodId: {
            type: "number",
            description: "Payment method ID",
          },
        },
        required: ["name", "planId"],
      },
    };
  • Registration of the create-essential-subscription tool in 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,
    ];
  • The handlers object export that includes the create-essential-subscription handler key.
    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);
      },
    };
Behavior3/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 usefully adds that the operation returns a TASK ID for tracking status, which is crucial context not inferable from the input schema. However, it doesn't disclose other important traits like whether this is a mutating operation (implied by 'Create'), potential side effects, authentication needs, rate limits, or error conditions, leaving significant gaps.

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 extremely concise—two sentences that directly state the tool's purpose and key behavioral detail (TASK ID return). It's front-loaded with the core action and wastes no words, making it efficient for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's complexity (a mutating operation with 4 parameters, no annotations, and no output schema), the description is incomplete. It covers the basic purpose and return mechanism but lacks context on usage guidelines, behavioral risks, or integration with sibling tools (e.g., 'get-task-by-id' for tracking). However, the high schema coverage and conciseness partially compensate, making it minimally adequate but with clear gaps.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly (e.g., 'planId' description references '/fixed/plans'). The description adds no additional parameter semantics beyond what's in the schema, such as explaining relationships between parameters (e.g., how 'paymentMethod' and 'paymentMethodId' interact) or usage examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 ('Create a new essential subscription') and resource ('essential subscription'), which is specific and unambiguous. However, it doesn't explicitly distinguish this from sibling tools like 'create-pro-subscription' or 'create-pro-database', which would require mentioning what makes an 'essential' subscription different from 'pro' alternatives.

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 'create-pro-subscription' or other sibling tools. It also doesn't mention prerequisites, such as needing plan IDs from 'get-essentials-plans' or payment methods from 'get-current-payment-methods', leaving the agent to infer context from parameter descriptions alone.

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