Skip to main content
Glama
redis

Redis Cloud API MCP Server

Official
by redis

get-task-by-id

Retrieve a specific task by its ID for your Redis Cloud account using the Redis Cloud API MCP Server to manage and monitor task status and details efficiently.

Instructions

Get a task by ID for the current Cloud Redis account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID

Implementation Reference

  • Handler function for the 'get-task-by-id' tool. Extracts taskId from request, validates it, calls TasksService.getTaskById, and returns formatted response.
    "get-task-by-id": async (request: ToolRequest) => {
      const { taskId } = extractArguments<{ taskId: string }>(request);
    
      // Validate input
      validateToolInput(commonSchemas.taskId, taskId, "Task ID");
    
      const task = await executeApiCall(
        () => TasksService.getTaskById(taskId),
        `Get task ${taskId}`,
      );
    
      return createToolResponse(task);
    },
  • Tool definition including name, description, and input schema for 'get-task-by-id' requiring a taskId string.
    const GET_TASK_BY_ID_TOOL: Tool = {
      name: "get-task-by-id",
      description: "Get a task by ID for the current Cloud Redis account",
      inputSchema: {
        type: "object",
        properties: {
          taskId: {
            type: "string",
            description: "Task ID",
            minLength: 1,
          },
        },
        required: ["taskId"],
      },
    };
  • Registers the 'get-task-by-id' tool by including it in the exported TASKS_TOOLS array, which is later aggregated in the main server.
    export const TASKS_TOOLS = [GET_TASKS_TOOL, GET_TASK_BY_ID_TOOL];

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