get_release_by_id
Retrieve detailed information about a specific Octopus Deploy release using its unique identifier and space name to inspect deployment status and configuration.
Instructions
Get details for a specific release by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spaceName | Yes | The space name | |
| releaseId | Yes | The ID of the release to retrieve |
Implementation Reference
- src/tools/getReleaseById.ts:19-46 (handler)The core handler logic that authenticates with Octopus Deploy, fetches the specific release by ID using the ReleaseRepository, extracts key fields, and returns them as JSON-formatted text content.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-18 (schema)Input schema using Zod for spaceName and releaseId parameters, along with output description metadata indicating read-only access.{ 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, },
- src/tools/getReleaseById.ts:8-48 (registration)The server.tool call within registerGetReleaseByIdTool that registers the tool with name, description, input schema, output metadata, and handler on the MCP server.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 of the tool definition into the TOOL_REGISTRY, specifying toolset 'releases' and read-only, linking to the register function.registerToolDefinition({ toolName: "get_release_by_id", config: { toolset: "releases", readOnly: true }, registerFn: registerGetReleaseByIdTool, });
- src/tools/index.ts:14-14 (registration)Import statement in the tools index that loads the getReleaseById module, triggering its TOOL_REGISTRY registration.import "./getReleaseById.js";