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
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | Task ID |
Implementation Reference
- src/tools/tasks/index.ts:49-61 (handler)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); },
- src/tools/tasks/index.ts:22-36 (schema)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"], }, };
- src/tools/tasks/index.ts:38-38 (registration)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];