get_task_raw
Retrieve detailed raw information for a specific Octopus Deploy server task using its unique ID and space name to inspect task execution and diagnose deployment issues.
Instructions
Get raw details for a specific server task by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spaceName | Yes | ||
| taskId | Yes |
Implementation Reference
- src/tools/getTaskRaw.ts:33-54 (handler)The core handler function for the 'get_task_raw' tool that creates an Octopus Deploy client from environment config, fetches raw task details from the specified space and task ID, and returns it as MCP text content.async (args) => { const { spaceName, taskId } = args as GetTaskRawParams; 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.getRaw(taskId); return { content: [ { type: "text", text: response, }, ], }; }
- src/tools/getTaskRaw.ts:7-10 (schema)TypeScript interface defining the input parameters for the get_task_raw tool: spaceName and taskId.export interface GetTaskRawParams { spaceName: string; taskId: string; }
- src/tools/getTaskRaw.ts:24-56 (registration)Registers the 'get_task_raw' tool on the MCP server using server.tool(), defining name, description, Zod input schema, tool properties, and handler.export function registerGetTaskRawTool(server: McpServer) { server.tool( 'get_task_raw', 'Get raw details for a specific server task by its ID', { spaceName: z.string(), taskId: z.string() }, { title: 'Get raw details for a specific server task by its ID', readOnlyHint: true, }, async (args) => { const { spaceName, taskId } = args as GetTaskRawParams; 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.getRaw(taskId); return { content: [ { type: "text", text: response, }, ], }; } ); }
- src/tools/getTaskRaw.ts:58-62 (registration)Self-registers the tool definition in the global TOOL_REGISTRY, enabling conditional registration via src/tools/index.ts based on toolset config.registerToolDefinition({ toolName: "get_task_raw", config: { toolset: "tasks", readOnly: true }, registerFn: registerGetTaskRawTool, });