Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

get_task_details

Read-only

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,
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide readOnlyHint=true, indicating a safe read operation. The description adds value by explaining that tasks can be monitored for status and progress, which offers behavioral context beyond annotations. However, it does not detail response format, error handling, or other operational traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by explanatory context. It is appropriately sized with two sentences, though the second sentence could be more focused on tool-specific guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with 2 parameters and no output schema, the description covers basic purpose and context but lacks details on parameter usage, return values, and differentiation from siblings. It is minimally adequate but has clear gaps in guiding effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'by its ID' for taskId but does not explain spaceName or provide format/constraints for either parameter. It adds minimal semantic value, baseline 3 due to low coverage but insufficient compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'detailed information for a specific server task by its ID', with additional context about tasks representing background operations. It distinguishes from siblings like 'get_task_by_id' by specifying 'detailed information' rather than just retrieving a task, though the distinction could be more explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing detailed task information by ID, but does not explicitly state when to use this vs. alternatives like 'get_task_by_id' or 'get_task_raw'. It provides context about tasks but lacks clear guidance on tool selection among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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