Skip to main content
Glama
redis

Redis Cloud API MCP Server

Official
by redis

get-essential-subscriptions

Retrieve essential subscriptions for your Redis Cloud account using paginated results. Specify page and size parameters to access all subscriptions efficiently.

Instructions

Get the essential subscriptions for the current Cloud Redis account. A paginated response is returned, and to get all the essential subscriptions, the page and size parameters must be used until all the essential subscriptions are retrieved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number
sizeNoPage size

Implementation Reference

  • Handler function for the get-essential-subscriptions tool. Extracts pagination parameters, validates input, fetches all essential subscriptions from the service, applies pagination, and returns a paginated Pageable response.
    "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),
      );
    },
  • Tool schema definition including name, description, and input schema for pagination parameters (page and size).
    const GET_ESSENTIAL_SUBSCRIPTIONS_TOOL: Tool = {
      name: "get-essential-subscriptions",
      description:
        "Get the essential subscriptions for the current Cloud Redis account. " +
        "A paginated response is returned, and to get all the essential subscriptions, the page and size parameters must be used until all the essential subscriptions are retrieved.",
      inputSchema: {
        type: "object",
        properties: {
          page: {
            type: "number",
            description: "Page number",
            default: 0,
          },
          size: {
            type: "number",
            description: "Page size",
            default: DEFAULT_PAGE_SIZE,
          },
        },
        required: [],
      },
    };
  • src/index.ts:49-56 (registration)
    Registration of the tool handlers by spreading SUBSCRIPTIONS_ESSENTIALS_HANDLERS into the global ALL_HANDLERS object used by the MCP server for tool calls.
    const ALL_HANDLERS = {
      ...ACCOUNT_HANDLERS,
      ...SUBSCRIPTIONS_ESSENTIALS_HANDLERS,
      ...SUBSCRIPTIONS_PRO_HANDLERS,
      ...TASKS_HANDLERS,
      ...DATABASES_PRO_HANDLERS,
      ...DATABASES_ESSENTIALS_HANDLERS,
    };
  • src/index.ts:40-47 (registration)
    Registration of the tool definitions by including SUBSCRIPTIONS_ESSENTIALS_TOOLS in the global ALL_TOOLS array returned by the list tools handler.
    const ALL_TOOLS = [
      ...ACCOUNT_TOOLS,
      ...SUBSCRIPTIONS_PRO_TOOLS,
      ...SUBSCRIPTIONS_ESSENTIALS_TOOLS,
      ...TASKS_TOOLS,
      ...DATABASES_PRO_TOOLS,
      ...DATABASES_ESSENTIALS_TOOLS,
    ];
  • Zod schema used for input validation in the handler (page and size parameters).
    const getSubscriptionsSchema = z.object({
      page: commonSchemas.page,
      size: commonSchemas.size,
    });
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 effectively describes key traits: it's a read operation (implied by 'Get'), returns paginated responses, and requires iterative use of parameters to retrieve all data. However, it lacks details on authentication needs, rate limits, or error handling, which would be beneficial for a tool with no annotations.

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 appropriately sized with two sentences that are front-loaded with the core purpose. The second sentence adds necessary behavioral detail about pagination, but it could be slightly more concise by combining ideas without losing clarity.

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 moderate complexity (paginated list retrieval), no annotations, and no output schema, the description is somewhat complete but has gaps. It covers the purpose and pagination behavior but lacks details on response format, error cases, or how to handle the iterative process effectively, which would help an agent use it correctly.

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 both parameters ('page' and 'size') with descriptions and defaults. The description adds value by explaining that these parameters must be used iteratively to get all subscriptions, but it doesn't provide additional semantic context beyond what the schema offers, such as typical usage patterns or constraints.

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 ('Get') and resource ('essential subscriptions for the current Cloud Redis account'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get-essential-subscription-by-id' or 'get-pro-subscriptions', which would require mentioning it retrieves all essential subscriptions in a paginated list format.

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

Usage Guidelines3/5

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

The description implies usage by mentioning pagination and the need to iterate through pages, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'get-essential-subscription-by-id' for single subscriptions or 'get-pro-subscriptions' for different subscription types. No exclusions or prerequisites are stated.

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