Skip to main content
Glama
redis

Redis Cloud API MCP Server

Official
by redis

create-pro-subscription

Initiate and track the creation of a new Redis Cloud PRO subscription. Requires validated payment methods, database modules, and regions. Returns a TASK ID for progress monitoring.

Instructions

Create a new pro subscription. Returns a TASK ID that can be used to track the status of the subscription creation. Prerequisites: 1) Verify payment method by checking get-current-payment-methods. 2) For database modules, validate against get-database-modules list. 3) Validate regions using get-pro-plans-regions. The payload must match the input schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cloudProvidersYesRequired. Cloud hosting & networking details. Make sure to validate this before submitting the subscription.
databasesYesRequired. Databases specifications for each planned database. Make sure to validate this before submitting the subscription.
deploymentTypeNoOptional. When 'single-region' or null: Creates a single region subscription. When 'active-active': creates an active-active (multi-region) subscription
dryRunNoOptional. When 'false': Creates a deployment plan and deploys it (creating any resources required by the plan). When 'true': creates a read-only deployment plan without any resource creation. Default: 'false'
memoryStorageNoOptional. Memory storage preference: either 'ram' or a combination of 'ram-and-flash'. Default: 'ram'ram
nameNoOptional. Subscription name
paymentMethodNoRequired. The payment method for the requested subscription. If 'credit-card' is specified, 'paymentMethodId' must be defined. Default: 'credit-card. Validate this before submitting the subscription.credit-card
paymentMethodIdNoRequired if paymentMethod is credit-card. A valid payment method that was pre-defined in the current account. This value is Optional if 'paymentMethod' is 'marketplace', but Required for all other account types. Validate this before submitting the subscription.
redisVersionNoOptional. If specified, the redisVersion defines the Redis version of the databases in the subscription. If omitted, the Redis version will be the default

Implementation Reference

  • The handler function that implements the 'create-pro-subscription' tool. It extracts and validates the input arguments using Zod schema, checks for required paymentMethodId if using credit-card, calls the SubscriptionsProService.createSubscription API, and returns the result.
    "create-pro-subscription": async (request) => {
      const {
        name,
        dryRun,
        deploymentType,
        paymentMethod,
        paymentMethodId,
        memoryStorage,
        cloudProviders,
        databases,
        redisVersion,
      } = extractArguments<{
        name?: string;
        dryRun?: boolean;
        deploymentType?: SubscriptionCreateRequest["deploymentType"];
        paymentMethod?: SubscriptionCreateRequest["paymentMethod"];
        paymentMethodId?: number;
        memoryStorage?: SubscriptionCreateRequest["memoryStorage"];
        cloudProviders: SubscriptionCreateRequest["cloudProviders"];
        databases: SubscriptionCreateRequest["databases"];
        redisVersion?: string;
      }>(request);
    
      // Validate input
      validateToolInput(
        createSubscriptionSchema,
        {
          name,
          dryRun,
          deploymentType,
          paymentMethod,
          paymentMethodId,
          memoryStorage,
          cloudProviders,
          databases,
          redisVersion,
        },
        "Create pro 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 result = await executeApiCall(
        () =>
          SubscriptionsProService.createSubscription({
            name,
            dryRun,
            deploymentType,
            paymentMethod,
            paymentMethodId,
            memoryStorage,
            cloudProviders,
            databases,
            redisVersion,
          } as SubscriptionCreateRequest),
        "Create pro subscription",
      );
    
      return createToolResponse(result);
    },
  • Zod schema used for input validation in the create-pro-subscription handler.
    const createSubscriptionSchema = z.object({
      name: z.string().optional(),
      dryRun: z.boolean().optional(),
      deploymentType: z.enum(["single-region", "active-active"]).optional(),
      paymentMethod: commonSchemas.paymentMethod,
      paymentMethodId: z.number().int().optional(),
      memoryStorage: z.enum(["ram", "ram-and-flash"]).optional(),
      cloudProviders: z.array(
        z.object({
          provider: z.enum(["AWS", "GCP"]).optional(),
          cloudAccountId: z.number().int().optional(),
          regions: z.array(
            z.object({
              region: z.string(),
              multipleAvailabilityZones: z.boolean().optional(),
              preferredAvailabilityZones: z.array(z.string()).optional(),
              networking: z
                .object({
                  deploymentCIDR: z.string(),
                  vpcId: z.string().optional(),
                })
                .optional(),
            }),
          ),
        }),
      ),
      databases: z.array(
        z.object({
          name: commonSchemas.name,
          protocol: z.enum(["redis", "memcached"]),
          datasetSizeInGb: z.number().min(0.1).optional(),
          supportOSSClusterApi: z.boolean().optional(),
          dataPersistence: z
            .enum([
              "none",
              "aof-every-1-second",
              "aof-every-write",
              "snapshot-every-1-hour",
              "snapshot-every-6-hours",
              "snapshot-every-12-hours",
            ])
            .optional(),
          replication: z.boolean().optional(),
          throughputMeasurement: z
            .object({
              by: z.enum(["operations-per-second", "number-of-shards"]),
              value: z.number().int(),
            })
            .optional(),
          localThroughputMeasurement: z.array(localThroughputSchema).optional(),
          modules: z.array(databaseModuleSchema).optional(),
          quantity: z.number().int().optional(),
          averageItemSizeInBytes: z.number().int().optional(),
          respVersion: z.enum(["resp2", "resp3"]).optional(),
          shardingType: z
            .enum([
              "default-regex-rules",
              "custom-regex-rules",
              "redis-oss-hashing",
            ])
            .optional(),
          queryPerformanceFactor: z.string().optional(),
        }),
      ),
      redisVersion: z.string().optional(),
    });
  • Tool definition including name, description, and detailed inputSchema for the MCP tool 'create-pro-subscription'.
    const CREATE_PRO_SUBSCRIPTION_TOOL: Tool = {
      name: "create-pro-subscription",
      description:
        "Create a new pro subscription. Returns a TASK ID that can be used to track the status of the subscription creation. " +
        "Prerequisites: 1) Verify payment method by checking get-current-payment-methods. " +
        "2) For database modules, validate against get-database-modules list. " +
        "3) Validate regions using get-pro-plans-regions. " +
        "The payload must match the input schema.",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Optional. Subscription name",
            example: "My new subscription",
          },
          dryRun: {
            type: "boolean",
            description:
              "Optional. When 'false': Creates a deployment plan and deploys it (creating any resources required by the plan). When 'true': creates a read-only deployment plan without any resource creation. Default: 'false'",
            default: false,
          },
          deploymentType: {
            type: "string",
            description:
              "Optional. When 'single-region' or null: Creates a single region subscription. When 'active-active': creates an active-active (multi-region) subscription",
            enum: ["single-region", "active-active"],
          },
          paymentMethod: {
            type: "string",
            description:
              "Required. The payment method for the requested subscription. If 'credit-card' is specified, 'paymentMethodId' must be defined. Default: 'credit-card. Validate this before submitting the subscription.",
            enum: ["credit-card", "marketplace"],
            default: "credit-card",
          },
          paymentMethodId: {
            type: "integer",
            description:
              "Required if paymentMethod is credit-card. A valid payment method that was pre-defined in the current account. This value is Optional if 'paymentMethod' is 'marketplace', but Required for all other account types. Validate this before submitting the subscription.",
            format: "int32",
          },
          memoryStorage: {
            type: "string",
            description:
              "Optional. Memory storage preference: either 'ram' or a combination of 'ram-and-flash'. Default: 'ram'",
            enum: ["ram", "ram-and-flash"],
            default: "ram",
          },
          cloudProviders: {
            type: "array",
            description:
              "Required. Cloud hosting & networking details.  Make sure to validate this before submitting the subscription.",
            items: {
              type: "object",
              properties: {
                provider: {
                  type: "string",
                  description: "Optional. Cloud provider. Default: 'AWS'",
                  enum: ["AWS", "GCP"],
                  default: "AWS",
                },
                cloudAccountId: {
                  type: "integer",
                  description:
                    "Optional. Cloud account identifier. Default: Redis internal cloud account (using Cloud Account Id = 1 implies using Redis internal cloud account). Note that a GCP subscription can be created only with Redis internal cloud account.",
                  format: "int32",
                  example: 1,
                },
                regions: {
                  type: "array",
                  description:
                    "Required. Cloud networking details, per region (single region or multiple regions for Active-Active cluster only)",
                  items: {
                    type: "object",
                    properties: {
                      region: {
                        type: "string",
                        description:
                          "Required. Deployment region as defined by cloud provider",
                        example: "us-east-1",
                      },
                      multipleAvailabilityZones: {
                        type: "boolean",
                        description:
                          "Optional. Support deployment on multiple availability zones within the selected region. Default: 'false'",
                        default: false,
                      },
                      preferredAvailabilityZones: {
                        type: "array",
                        description:
                          "Optional. Availability zones deployment preferences. If 'multipleAvailabilityZones' is set to 'true', you must specify three availability zones.",
                        items: {
                          type: "string",
                        },
                      },
                      networking: {
                        type: "object",
                        description:
                          "Optional. Cloud networking details. Default: if using Redis internal cloud account, 192.168.0.0/24",
                        properties: {
                          deploymentCIDR: {
                            type: "string",
                            description:
                              "Optional. Deployment CIDR mask. Default: If using Redis internal cloud account, 192.168.0.0/24",
                            example: "10.0.0.0/24",
                          },
                          vpcId: {
                            type: "string",
                            description:
                              "Optional. Either an existing VPC Id or create a new VPC (if no VPC is specified)",
                            example: "<vpc-identifier>",
                          },
                        },
                        required: ["deploymentCIDR"],
                      },
                    },
                    required: ["region"],
                  },
                },
              },
              required: ["regions"],
            },
          },
          databases: {
            type: "array",
            description:
              "Required. Databases specifications for each planned database. Make sure to validate this before submitting the subscription.",
            items: {
              type: "object",
              properties: {
                name: {
                  type: "string",
                  description:
                    "Required. Database name (must be up to 40 characters long, include only letters, digits, or hyphen ('-'), start with a letter, and end with a letter or digit)",
                  example: "Redis-database-example",
                },
                protocol: {
                  type: "string",
                  description:
                    "Optional. Database protocol: either 'redis' or 'memcached'. Default: 'redis'",
                  enum: ["redis", "memcached"],
                  default: "redis",
                },
                datasetSizeInGb: {
                  type: "number",
                  description:
                    "Optional. The maximum amount of data in the dataset for this specific database is in GB. You can not set both datasetSizeInGb and totalMemoryInGb.",
                  format: "double",
                  minimum: 0.1,
                  example: 1,
                },
                supportOSSClusterApi: {
                  type: "boolean",
                  description:
                    "Optional. Support Redis open-source (OSS) Cluster API. Default: 'false'",
                  default: false,
                },
                dataPersistence: {
                  type: "string",
                  description:
                    "Optional. Rate of database data persistence (in persistent storage). Default: 'none'",
                  enum: [
                    "none",
                    "aof-every-1-second",
                    "aof-every-write",
                    "snapshot-every-1-hour",
                    "snapshot-every-6-hours",
                    "snapshot-every-12-hours",
                  ],
                },
                replication: {
                  type: "boolean",
                  description: "Optional. Databases replication. Default: 'true'",
                  default: true,
                },
                throughputMeasurement: {
                  type: "object",
                  description:
                    "Optional. Throughput measurement method. Default: 25000 ops/sec",
                  properties: {
                    by: {
                      type: "string",
                      description:
                        "Required. Throughput measurement method. Either 'number-of-shards' or 'operations-per-second'",
                      enum: ["operations-per-second", "number-of-shards"],
                    },
                    value: {
                      type: "integer",
                      description:
                        "Required. Throughput value (as applies to selected measurement method)",
                      format: "int64",
                      example: 10000,
                    },
                  },
                  required: ["by", "value"],
                },
                localThroughputMeasurement: {
                  type: "array",
                  description:
                    "Optional. Throughput measurement for an active-active subscription",
                  items: {
                    type: "object",
                    properties: {
                      region: {
                        type: "string",
                      },
                      writeOperationsPerSecond: {
                        type: "integer",
                        description: "Default: 1000 ops/sec",
                        format: "int64",
                        example: 1000,
                      },
                      readOperationsPerSecond: {
                        type: "integer",
                        description: "Default: 1000 ops/sec",
                        format: "int64",
                        example: 1000,
                      },
                    },
                  },
                },
                modules: {
                  type: "array",
                  description:
                    "Optional. Redis modules to be provisioned in the database.  Use get-database-modules to retrieve available modules and configure the desired ones",
                  items: {
                    type: "object",
                    properties: {
                      name: {
                        type: "string",
                        description:
                          "Required. Redis module Id. Get the list of available module identifiers by calling get-database-modules",
                      },
                      parameters: {
                        type: "object",
                        description: "Optional. Redis database module parameters",
                        additionalProperties: true,
                      },
                    },
                    required: ["name"],
                  },
                },
                quantity: {
                  type: "integer",
                  description:
                    "Optional. Number of databases (of this type) that will be created. Default: 1",
                  format: "int32",
                  example: 1,
                },
                averageItemSizeInBytes: {
                  type: "integer",
                  description:
                    "Optional. Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes) of the items stored in the database. Default: 1000",
                  format: "int64",
                },
                respVersion: {
                  type: "string",
                  description:
                    "Optional. RESP version must be compatible with Redis version.",
                  enum: ["resp2", "resp3"],
                  example: "resp3",
                },
                shardingType: {
                  type: "string",
                  description: "Optional. Database Hashing policy.",
                  enum: [
                    "default-regex-rules",
                    "custom-regex-rules",
                    "redis-oss-hashing",
                  ],
                },
                queryPerformanceFactor: {
                  type: "string",
                  description:
                    "Optional. The query performance factor adds extra compute power specifically for search and query.",
                  example: "2x",
                },
              },
              required: ["name", "protocol"],
            },
          },
          redisVersion: {
            type: "string",
            description:
              "Optional. If specified, the redisVersion defines the Redis version of the databases in the subscription. If omitted, the Redis version will be the default",
            example: "7.2",
          },
        },
        required: ["cloudProviders", "databases"],
      },
    };
  • Registration of the create-pro-subscription tool in the SUBSCRIPTIONS_PRO_TOOLS array, which is likely imported and registered in a higher-level tools registry.
    export const SUBSCRIPTIONS_PRO_TOOLS = [
      CREATE_PRO_SUBSCRIPTION_TOOL,
      GET_PRO_SUBSCRIPTIONS_TOOL,
      GET_PRO_SUBSCRIPTION_TOOL,
    ];
  • Export of tool handlers map including the handler for 'create-pro-subscription', used for registration in the MCP tools system.
    export const SUBSCRIPTIONS_PRO_HANDLERS: ToolHandlers = {
      "create-pro-subscription": async (request) => {
        const {
          name,
          dryRun,
          deploymentType,
          paymentMethod,
          paymentMethodId,
          memoryStorage,
          cloudProviders,
          databases,
          redisVersion,
        } = extractArguments<{
          name?: string;
          dryRun?: boolean;
          deploymentType?: SubscriptionCreateRequest["deploymentType"];
          paymentMethod?: SubscriptionCreateRequest["paymentMethod"];
          paymentMethodId?: number;
          memoryStorage?: SubscriptionCreateRequest["memoryStorage"];
          cloudProviders: SubscriptionCreateRequest["cloudProviders"];
          databases: SubscriptionCreateRequest["databases"];
          redisVersion?: string;
        }>(request);
    
        // Validate input
        validateToolInput(
          createSubscriptionSchema,
          {
            name,
            dryRun,
            deploymentType,
            paymentMethod,
            paymentMethodId,
            memoryStorage,
            cloudProviders,
            databases,
            redisVersion,
          },
          "Create pro 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 result = await executeApiCall(
          () =>
            SubscriptionsProService.createSubscription({
              name,
              dryRun,
              deploymentType,
              paymentMethod,
              paymentMethodId,
              memoryStorage,
              cloudProviders,
              databases,
              redisVersion,
            } as SubscriptionCreateRequest),
          "Create pro subscription",
        );
    
        return createToolResponse(result);
      },
    
      "get-pro-subscriptions": async () => {
        const subscriptions = await executeApiCall(
          () => SubscriptionsProService.getAllSubscriptions(),
          "Get pro subscriptions",
        );
        return createToolResponse(subscriptions);
      },
      "get-pro-subscription": async (request) => {
        const { subscriptionId } = extractArguments<{
          subscriptionId: number;
        }>(request);
    
        // Validate input
        validateToolInput(
          subscriptionIdSchema,
          subscriptionId,
          `Get pro subscription: ${subscriptionId}`,
        );
    
        const result = await executeApiCall(
          () => SubscriptionsProService.getSubscriptionById(subscriptionId),
          `Get pro subscription: ${subscriptionId}`,
        );
    
        return createToolResponse(result);
      },
    };
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: it returns a TASK ID for tracking status (asynchronous operation), mentions prerequisites (validation steps), and implies a mutation/write operation ('Create'). However, it doesn't mention permissions, rate limits, or error handling, leaving some gaps for a complex creation 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 efficiently structured: first sentence states purpose and return value, second lists prerequisites as bullet points, third reminds about schema compliance. Every sentence adds value with zero waste, and it's front-loaded with the core functionality.

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

Completeness4/5

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

For a complex creation tool with 9 parameters, no annotations, and no output schema, the description does well by explaining the asynchronous nature (TASK ID) and prerequisites. However, it doesn't cover error cases, response format details beyond the task ID, or what happens on failure, which would be helpful given the tool's complexity.

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 9 parameters thoroughly. The description adds no specific parameter semantics beyond general validation guidance ('payload must match the input schema'). It doesn't explain parameter interactions or provide additional context beyond what's in the schema descriptions.

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 action ('Create a new pro subscription') and resource ('pro subscription'), distinguishing it from siblings like 'create-essential-subscription' (different tier) and 'create-pro-database' (different resource). It's specific about what the tool does.

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

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit prerequisites (verify payment method, validate database modules, validate regions) and references specific sibling tools ('get-current-payment-methods', 'get-database-modules', 'get-pro-plans-regions') for validation. It clearly indicates when preparation is needed before using this tool.

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