Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

get_task_raw

Retrieve detailed raw information for a specific server task using its ID and space name to inspect task execution details and diagnose deployment issues.

Instructions

Get raw details for a specific server task by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceNameYes
taskIdYes

Implementation Reference

  • The core handler function for the 'get_task_raw' tool. It validates inputs, creates an Octopus Deploy client from environment config, retrieves raw task details via SpaceServerTaskRepository.getRaw(taskId), and returns the response as 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, }, ], }; }
  • TypeScript interface defining the input parameters for the get_task_raw tool: spaceName and taskId.
    export interface GetTaskRawParams { spaceName: string; taskId: string; }
  • Registers the 'get_task_raw' tool on the MCP server using server.tool(), including Zod schema for inputs {spaceName: z.string(), taskId: z.string()}, description, metadata, and the handler function.
    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, }, ], }; } ); }
  • Self-registers the get_task_raw tool into the global TOOL_REGISTRY, specifying its toolset ('tasks') and read-only nature, linking to the registerGetTaskRawTool function.
    registerToolDefinition({ toolName: "get_task_raw", config: { toolset: "tasks", readOnly: true }, registerFn: registerGetTaskRawTool, });
  • Helper function to retrieve raw task details given a pre-configured Client and params. Duplicates logic similar to the main handler but requires client to be passed.
    export async function getTaskRaw(client: Client, params: GetTaskRawParams) { const { spaceName, taskId } = params; if (!taskId) { throw new Error("Task ID is required"); } const serverTaskRepository = new SpaceServerTaskRepository(client, spaceName); const response = await serverTaskRepository.getRaw(taskId); return response; }

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