Skip to main content
Glama
redis

Redis Cloud API MCP Server

Official
by redis

get-pro-subscription

Retrieve a pro subscription by ID using the Redis Cloud API MCP Server. Ensure the payload matches the required input schema for successful execution.

Instructions

Get pro subscription by ID. The payload must match the input schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriptionIdYesSubscription ID

Implementation Reference

  • The main handler function for the 'get-pro-subscription' tool. It extracts the subscriptionId from the input, validates it using subscriptionIdSchema, calls the SubscriptionsProService.getSubscriptionById API, and returns the result wrapped in createToolResponse.
    "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); },
  • Tool definition including the name, description, and input schema for 'get-pro-subscription', which requires a subscriptionId (number, min 1).
    const GET_PRO_SUBSCRIPTION_TOOL: Tool = { name: "get-pro-subscription", description: "Get pro subscription by ID. The payload must match the input schema.", inputSchema: { type: "object", properties: { subscriptionId: { type: "number", description: "Subscription ID", min: 1, }, }, required: ["subscriptionId"], }, };
  • Local registration of the get-pro-subscription tool in the SUBSCRIPTIONS_PRO_TOOLS array export.
    export const SUBSCRIPTIONS_PRO_TOOLS = [ CREATE_PRO_SUBSCRIPTION_TOOL, GET_PRO_SUBSCRIPTIONS_TOOL, GET_PRO_SUBSCRIPTION_TOOL, ];
  • src/index.ts:40-47 (registration)
    Global registration where SUBSCRIPTIONS_PRO_TOOLS (including get-pro-subscription) is spread into ALL_TOOLS for the MCP server listTools handler.
    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 where SUBSCRIPTIONS_PRO_HANDLERS (including get-pro-subscription handler) is spread into ALL_HANDLERS for the MCP server callTool handler.
    const ALL_HANDLERS = { ...ACCOUNT_HANDLERS, ...SUBSCRIPTIONS_ESSENTIALS_HANDLERS, ...SUBSCRIPTIONS_PRO_HANDLERS, ...TASKS_HANDLERS, ...DATABASES_PRO_HANDLERS, ...DATABASES_ESSENTIALS_HANDLERS, };

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