get-essential-subscription-by-id
Retrieve details of a specific Redis Cloud essential subscription using its unique ID to manage your account resources effectively.
Instructions
Get an essential subscription by ID for the current Cloud Redis account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subscriptionId | Yes | Subscription ID |
Implementation Reference
- Handler function that extracts subscriptionId, validates input using subscriptionIdSchema, calls SubscriptionsEssentialsService.getSubscriptionById1, and returns the result wrapped in createToolResponse.
"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); }, - Tool definition object including name, description, and inputSchema specifying subscriptionId as required number >=1.
const GET_ESSENTIAL_SUBSCRIPTION_BY_ID_TOOL: Tool = { name: "get-essential-subscription-by-id", description: "Get an essential subscription by ID for the current Cloud Redis account", inputSchema: { type: "object", properties: { subscriptionId: { type: "number", description: "Subscription ID", min: 1, }, }, required: ["subscriptionId"], }, }; - src/tools/subscriptions/essentials/index.ts:163-169 (registration)Export of the array of Tool objects, registering 'get-essential-subscription-by-id' tool among essential subscriptions tools.
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, ];