get_task_details
Retrieve detailed status and progress information for specific Octopus Deploy server tasks using their unique IDs. Monitor deployments, health checks, and system maintenance operations to track background processes and diagnose issues.
Instructions
Get detailed information for a specific server task by its ID. Tasks represent background operations in Octopus Deploy, such as deployments, health checks, and system maintenance. Each task has a unique ID and can be monitored for status and progress.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spaceName | Yes | ||
| taskId | Yes |
Implementation Reference
- src/tools/getTaskDetails.ts:34-56 (handler)The core handler function for the get_task_details tool. It extracts parameters, validates taskId, initializes the Octopus Deploy client, retrieves task details via SpaceServerTaskRepository.getDetails, and formats the response as MCP content.async (args) => { const { spaceName, taskId } = args as GetTaskDetailsParams; if (!taskId) { throw new Error("Task ID is required"); } const configuration = getClientConfigurationFromEnvironment(); const client = await Client.create(configuration); const serverTaskRepository = new SpaceServerTaskRepository(client, spaceName); const response = await serverTaskRepository.getDetails(taskId); return { content: [ { type: "text", text: JSON.stringify(response), }, ], }; } );
- src/tools/getTaskDetails.ts:8-11 (schema)TypeScript interface defining the input parameters for the get_task_details tool: spaceName and taskId.export interface GetTaskDetailsParams { spaceName: string; taskId: string; }
- src/tools/getTaskDetails.ts:29-29 (schema)Zod schema for input validation used in server.tool registration: requires spaceName and taskId as strings.{ spaceName: z.string(), taskId: z.string() },
- src/tools/getTaskDetails.ts:25-57 (registration)Registers the get_task_details tool directly on the MCP server using server.tool(), providing name, description, input schema, options, and handler.export function registerGetTaskDetailsTool(server: McpServer) { server.tool( 'get_task_details', `Get detailed information for a specific server task by its ID. ${tasksDescription}`, { spaceName: z.string(), taskId: z.string() }, { title: 'Get detailed information for a specific server task by its ID', readOnlyHint: true, }, async (args) => { const { spaceName, taskId } = args as GetTaskDetailsParams; if (!taskId) { throw new Error("Task ID is required"); } const configuration = getClientConfigurationFromEnvironment(); const client = await Client.create(configuration); const serverTaskRepository = new SpaceServerTaskRepository(client, spaceName); const response = await serverTaskRepository.getDetails(taskId); return { content: [ { type: "text", text: JSON.stringify(response), }, ], }; } ); }
- src/tools/getTaskDetails.ts:59-63 (registration)Self-registers the tool in the global TOOL_REGISTRY, associating it with the 'tasks' toolset and read-only config, to be invoked by src/tools/index.ts registerTools.registerToolDefinition({ toolName: "get_task_details", config: { toolset: "tasks", readOnly: true }, registerFn: registerGetTaskDetailsTool, });