get_release_by_id
Retrieve detailed information about a specific Octopus Deploy release using its unique identifier and space name to access deployment data and configuration details.
Instructions
Get details for a specific release by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| releaseId | Yes | The ID of the release to retrieve | |
| spaceName | Yes | The space name |
Implementation Reference
- src/tools/getReleaseById.ts:19-46 (handler)The handler function that executes the tool logic: fetches the release by ID from Octopus Deploy API and formats response.async ({ spaceName, releaseId }) => { const configuration = getClientConfigurationFromEnvironment(); const client = await Client.create(configuration); const releaseRepository = new ReleaseRepository(client, spaceName); const release = await releaseRepository.get(releaseId); return { content: [ { type: "text", text: JSON.stringify({ id: release.Id, version: release.Version, channelId: release.ChannelId, projectId: release.ProjectId, releaseNotes: release.ReleaseNotes, assembled: release.Assembled, ignoreChannelRules: release.IgnoreChannelRules, selectedPackages: release.SelectedPackages, selectedGitResources: release.SelectedGitResources, buildInformation: release.BuildInformation, customFields: release.CustomFields }), }, ], }; }
- src/tools/getReleaseById.ts:11-14 (schema)Zod input schema defining parameters spaceName and releaseId.{ spaceName: z.string().describe("The space name"), releaseId: z.string().describe("The ID of the release to retrieve") },
- src/tools/getReleaseById.ts:7-48 (registration)Registration of the tool on the MCP server using server.tool, including name, description, schema, and handler.export function registerGetReleaseByIdTool(server: McpServer) { server.tool( "get_release_by_id", "Get details for a specific release by its ID", { spaceName: z.string().describe("The space name"), releaseId: z.string().describe("The ID of the release to retrieve") }, { title: "Get release details by ID from Octopus Deploy", readOnlyHint: true, }, async ({ spaceName, releaseId }) => { const configuration = getClientConfigurationFromEnvironment(); const client = await Client.create(configuration); const releaseRepository = new ReleaseRepository(client, spaceName); const release = await releaseRepository.get(releaseId); return { content: [ { type: "text", text: JSON.stringify({ id: release.Id, version: release.Version, channelId: release.ChannelId, projectId: release.ProjectId, releaseNotes: release.ReleaseNotes, assembled: release.Assembled, ignoreChannelRules: release.IgnoreChannelRules, selectedPackages: release.SelectedPackages, selectedGitResources: release.SelectedGitResources, buildInformation: release.BuildInformation, customFields: release.CustomFields }), }, ], }; } ); }
- src/tools/getReleaseById.ts:50-54 (registration)Self-registration into the TOOL_REGISTRY for conditional registration in index.ts.registerToolDefinition({ toolName: "get_release_by_id", config: { toolset: "releases", readOnly: true }, registerFn: registerGetReleaseByIdTool, });
- src/tools/index.ts:14-14 (registration)Import statement that triggers execution of the tool's self-registration code.import "./getReleaseById.js";