Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

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
NameRequiredDescriptionDefault
spaceNameYes
taskIdYes

Implementation Reference

  • 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), }, ], }; } );
  • TypeScript interface defining the input parameters for the get_task_details tool: spaceName and taskId.
    export interface GetTaskDetailsParams { spaceName: string; taskId: string; }
  • Zod schema for input validation used in server.tool registration: requires spaceName and taskId as strings.
    { spaceName: z.string(), taskId: z.string() },
  • 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), }, ], }; } ); }
  • 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, });

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/OctopusDeploy/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server