Skip to main content
Glama
redis

Redis Cloud API MCP Server

Official
by redis

create-pro-database

Set up a new database within a specified Redis Cloud subscription, enabling customizable configurations like data persistence, eviction policies, and modules installation. Track progress using the returned TASK ID.

Instructions

Create a new database inside the specified subscription ID. Returns a TASK ID that can be used to track the status of the database creationPrerequisites: 1) For database modules, validate against get-database-modules list. 2) Validate regions using get-pro-plans-regions. The payload must match the input schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
averageItemSizeInBytesNoOptional. Relevant only to ram-and-flash subscriptions. Estimated average size (measured in bytes) of the items stored in the database, Default: 1000
dataEvictionPolicyNoOptional. Data items eviction method. Default: 'volatile-lru'
dataPersistenceNoOptional. Rate of database data persistence (in persistent storage). Default: 'none'
datasetSizeInGbNoOptional. The maximum amount of data in the dataset for this specific database is in GB. You can not set both datasetSizeInGb and totalMemoryInGb. if 'replication' is true, the database's total memory will be twice as large as the datasetSizeInGb.if 'replication' is false, the database's total memory of the database will be the datasetSizeInGb value.
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: 'true'
enableTlsNoOptional. When 'true', requires TLS authentication for all connections (mTLS with valid clientSslCertificate, regular TLS when the clientSslCertificate is not provided. Default: 'false'
modulesNoOptional. Redis modules to be provisioned in the database. Use get-database-modules to retrieve available modules and configure the desired ones
nameYesRequired. Name of the database. Database name is limited to 40 characters or less and must include only letters, digits, and hyphens ('-'). It must start with a letter and end with a letter or digit.
passwordNoOptional. Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated. Can only be set if Database Protocol is REDIS
portNoOptional. TCP port on which the database is available (10000-19999). Generated automatically if omitted
protocolNoOptional. Database protocol. Default: 'redis'
queryPerformanceFactorNoOptional. The query performance factor adds extra compute power specifically for search and query.
replicationNoOptional. Databases replication. Default: 'true'
respVersionNoOptional. RESP version must be compatible with Redis version.
saslPasswordNoOptional. Memcached (SASL) Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated. Can only be set if Database Protocol is MEMCACHED
saslUsernameNoOptional. Memcached (SASL) Username to access the database. If omitted, the username will be set to a 'mc-' prefix followed by a random 5 character long alphanumeric. Can only be set if Database Protocol is MEMCACHED
shardingTypeNoOptional. Database Hashing policy.
sourceIpNoOptional. List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges.
subscriptionIdYesSubscription ID
supportOSSClusterApiNoOptional. Support Redis open-source (OSS) Cluster API. Default: 'false'
throughputMeasurementNoOptional. Throughput measurement method.

Implementation Reference

  • The asynchronous handler function for the 'create-pro-database' tool. Extracts arguments, validates using Zod schema, executes the API call to DatabasesProService.createDatabase, and returns the response.
    "create-pro-database": async (request) => {
      const payloadArguments = extractArguments<DatabaseCreateRequest>(request);
    
      // Validate input
      validateToolInput(
        databaseCreateRequestSchema,
        payloadArguments,
        `Create pro database using subscription: ${payloadArguments.subscriptionId}`,
      );
    
      const result = await executeApiCall(
        () =>
          DatabasesProService.createDatabase(
            payloadArguments.subscriptionId as never,
            payloadArguments,
          ),
        `Create pro database using subscription: ${payloadArguments.subscriptionId}`,
      );
    
      return createToolResponse(result);
    },
  • The MCP Tool definition for 'create-pro-database', including the name, description, and comprehensive inputSchema defining all parameters for database creation.
    const CREATE_PRO_DATABASE_TOOL: Tool = {
      name: "create-pro-database",
      description:
        "Create a new database inside the specified subscription ID. Returns a TASK ID that can be used to track the status of the database creation" +
        "Prerequisites: 1) For database modules, validate against get-database-modules list. " +
        "2) Validate regions using get-pro-plans-regions. " +
        "The payload must match the input schema.",
      inputSchema: {
        type: "object",
        properties: {
          subscriptionId: {
            type: "number",
            description: "Subscription ID",
            min: 0,
          },
          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: 'true'",
          },
          name: {
            type: "string",
            description:
              "Required. Name of the database. Database name is limited to 40 characters or less and must include only letters, digits, and hyphens ('-'). It must start with a letter and end with a letter or digit.",
          },
          protocol: {
            type: "string",
            description: "Optional. Database protocol. Default: 'redis'",
            enum: ["redis", "memcached"],
          },
          port: {
            type: "integer",
            description:
              "Optional. TCP port on which the database is available (10000-19999). Generated automatically if omitted",
          },
          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. if 'replication' is true, the database's total memory will be twice as large as the datasetSizeInGb.if 'replication' is false, the database's total memory of the database will be the datasetSizeInGb value.",
            minimum: 0.1,
          },
          respVersion: {
            type: "string",
            description:
              "Optional. RESP version must be compatible with Redis version.",
            enum: ["resp2", "resp3"],
          },
          supportOSSClusterApi: {
            type: "boolean",
            description:
              "Optional. Support Redis open-source (OSS) Cluster API. 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",
            ],
          },
          dataEvictionPolicy: {
            type: "string",
            description:
              "Optional. Data items eviction method. Default: 'volatile-lru'",
            enum: [
              "allkeys-lru",
              "allkeys-lfu",
              "allkeys-random",
              "volatile-lru",
              "volatile-lfu",
              "volatile-random",
              "volatile-ttl",
              "noeviction",
            ],
          },
          replication: {
            type: "boolean",
            description: "Optional. Databases replication. Default: 'true'",
          },
          throughputMeasurement: {
            type: "object",
            description: "Optional. Throughput measurement method.",
            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)",
              },
            },
            required: ["by", "value"],
          },
          averageItemSizeInBytes: {
            type: "integer",
            description:
              "Optional. Relevant only to ram-and-flash subscriptions. Estimated average size (measured in bytes) of the items stored in the database, Default: 1000",
          },
          sourceIp: {
            type: "array",
            description:
              "Optional. List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges.",
            items: {
              type: "string",
            },
          },
          enableTls: {
            type: "boolean",
            description:
              "Optional. When 'true', requires TLS authentication for all connections (mTLS with valid clientSslCertificate, regular TLS when the clientSslCertificate is not provided. Default: 'false'",
          },
          password: {
            type: "string",
            description:
              "Optional. Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated. Can only be set if Database Protocol is REDIS",
          },
          saslUsername: {
            type: "string",
            description:
              "Optional. Memcached (SASL) Username to access the database. If omitted, the username will be set to a 'mc-' prefix followed by a random 5 character long alphanumeric. Can only be set if Database Protocol is MEMCACHED",
          },
          saslPassword: {
            type: "string",
            description:
              "Optional. Memcached (SASL) Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated. Can only be set if Database Protocol is MEMCACHED",
          },
          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",
                },
              },
              required: ["name"],
            },
          },
          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.",
          },
        },
        required: ["subscriptionId", "name"],
      },
    };
  • Zod schema used for runtime validation of the 'create-pro-database' input parameters inside the handler.
    const databaseCreateRequestSchema = z.object({
      subscriptionId: commonSchemas.subscriptionId,
      dryRun: z.boolean().optional(),
      name: z.string(),
      protocol: z.union([z.literal("redis"), z.literal("memcached")]).optional(),
      port: z.number().optional(),
      datasetSizeInGb: z.number().optional(),
      respVersion: z.union([z.literal("resp2"), z.literal("resp3")]).optional(),
      supportOSSClusterApi: z.boolean().optional(),
      useExternalEndpointForOSSClusterApi: z.boolean().optional(),
      dataPersistence: z
        .union([
          z.literal("none"),
          z.literal("aof-every-1-second"),
          z.literal("aof-every-write"),
          z.literal("snapshot-every-1-hour"),
          z.literal("snapshot-every-6-hours"),
          z.literal("snapshot-every-12-hours"),
        ])
        .optional(),
      dataEvictionPolicy: z
        .union([
          z.literal("allkeys-lru"),
          z.literal("allkeys-lfu"),
          z.literal("allkeys-random"),
          z.literal("volatile-lru"),
          z.literal("volatile-lfu"),
          z.literal("volatile-random"),
          z.literal("volatile-ttl"),
          z.literal("noeviction"),
        ])
        .optional(),
      replication: z.boolean().optional(),
      replica: z
        .object({
          syncSources: z.array(
            z.object({
              endpoint: z.string(),
              encryption: z.boolean().optional(),
              serverCert: z.string().optional(),
            }),
          ),
        })
        .optional(),
      throughputMeasurement: z
        .object({
          by: z.union([
            z.literal("operations-per-second"),
            z.literal("number-of-shards"),
          ]),
          value: z.number(),
        })
        .optional(),
      localThroughputMeasurement: z
        .array(
          z.object({
            region: z.string().optional(),
            writeOperationsPerSecond: z.number().optional(),
            readOperationsPerSecond: z.number().optional(),
          }),
        )
        .optional(),
      averageItemSizeInBytes: z.number().optional(),
      remoteBackup: z
        .object({
          active: z.boolean().optional(),
          interval: z.string().optional(),
          backupInterval: z
            .union([
              z.literal("EVERY_24_HOURS"),
              z.literal("EVERY_12_HOURS"),
              z.literal("EVERY_6_HOURS"),
              z.literal("EVERY_4_HOURS"),
              z.literal("EVERY_2_HOURS"),
              z.literal("EVERY_1_HOURS"),
            ])
            .optional(),
          timeUTC: z.string().optional(),
          databaseBackupTimeUTC: z
            .union([
              z.literal("HOUR_ONE"),
              z.literal("HOUR_TWO"),
              z.literal("HOUR_THREE"),
              z.literal("HOUR_FOUR"),
              z.literal("HOUR_FIVE"),
              z.literal("HOUR_SIX"),
              z.literal("HOUR_SEVEN"),
              z.literal("HOUR_EIGHT"),
              z.literal("HOUR_NINE"),
              z.literal("HOUR_TEN"),
              z.literal("HOUR_ELEVEN"),
              z.literal("HOUR_TWELVE"),
            ])
            .optional(),
          storageType: z.string().optional(),
          backupStorageType: z
            .union([
              z.literal("http"),
              z.literal("redis"),
              z.literal("ftp"),
              z.literal("aws-s3"),
              z.literal("azure-blob-storage"),
              z.literal("google-blob-storage"),
            ])
            .optional(),
          storagePath: z.string().optional(),
        })
        .optional(),
      sourceIp: z.array(z.string()).optional(),
      clientTlsCertificates: z
        .array(
          z.object({
            publicCertificatePEMString: z.string(),
          }),
        )
        .optional(),
      enableTls: z.boolean().optional(),
      password: z.string().optional(),
      saslUsername: z.string().optional(),
      saslPassword: z.string().optional(),
      alerts: z
        .array(
          z.object({
            name: z.union([
              z.literal("dataset-size"),
              z.literal("datasets-size"),
              z.literal("throughput-higher-than"),
              z.literal("throughput-lower-than"),
              z.literal("latency"),
              z.literal("syncsource-error"),
              z.literal("syncsource-lag"),
              z.literal("connections-limit"),
            ]),
            value: z.number(),
          }),
        )
        .optional(),
      modules: z
        .array(
          z.object({
            name: z.string(),
            parameters: z.record(z.record(z.any())).optional(),
          }),
        )
        .optional(),
      shardingType: z
        .union([
          z.literal("default-regex-rules"),
          z.literal("custom-regex-rules"),
          z.literal("redis-oss-hashing"),
        ])
        .optional(),
      commandType: z.string().optional(),
      queryPerformanceFactor: z.string().optional(),
    });
  • src/index.ts:40-47 (registration)
    Global registration of all tools, including the 'create-pro-database' tool via spread of DATABASES_PRO_TOOLS.
    const ALL_TOOLS = [
      ...ACCOUNT_TOOLS,
      ...SUBSCRIPTIONS_PRO_TOOLS,
      ...SUBSCRIPTIONS_ESSENTIALS_TOOLS,
      ...TASKS_TOOLS,
      ...DATABASES_PRO_TOOLS,
      ...DATABASES_ESSENTIALS_TOOLS,
    ];
  • src/index.ts:49-56 (registration)
    Global registration of all tool handlers, including the handler for 'create-pro-database' via spread of DATABASES_PRO_HANDLERS.
    const ALL_HANDLERS = {
      ...ACCOUNT_HANDLERS,
      ...SUBSCRIPTIONS_ESSENTIALS_HANDLERS,
      ...SUBSCRIPTIONS_PRO_HANDLERS,
      ...TASKS_HANDLERS,
      ...DATABASES_PRO_HANDLERS,
      ...DATABASES_ESSENTIALS_HANDLERS,
    };
Behavior4/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 states that the tool 'Returns a TASK ID that can be used to track the status of the database creation,' which is crucial behavioral information about the asynchronous nature of the operation. However, it does not mention potential side effects like resource consumption, permissions required, or error handling, leaving some 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and outcome, followed by prerequisites in a bullet-like format. It is appropriately sized at three sentences, with each sentence adding value (creation action, return value, prerequisites). There is no redundant information, though it could be slightly more structured for readability.

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?

Given the complexity (21 parameters, no annotations, no output schema), the description is reasonably complete. It covers the purpose, return value (TASK ID), and prerequisites, which are essential for a creation tool. However, it lacks details on error conditions, rate limits, or authentication needs, which would enhance completeness for such a significant operation.

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 21 parameters in detail. The description adds no specific parameter information beyond the general note that 'The payload must match the input schema.' This meets the baseline of 3, as the schema does the heavy lifting, but the description does not compensate with additional context like default behaviors or interdependencies.

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 ('Create a new database') and resource ('inside the specified subscription ID'), and distinguishes from siblings like 'create-pro-subscription' (which creates subscriptions) and 'get-pro-databases' (which retrieves databases). The mention of returning a TASK ID adds specificity about the outcome.

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 explicitly provides prerequisites: '1) For database modules, validate against get-database-modules list. 2) Validate regions using get-pro-plans-regions.' It also mentions that 'The payload must match the input schema,' guiding proper usage. This gives clear when-to-use instructions, including validation steps before invocation.

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