UNPKG

endgame-mcp

Version:

[![github](https://github.com/user-attachments/assets/72708ed2-ab7e-49b4-8bb4-00c452ab4a44)](https://endgame.dev)

37 lines (34 loc) 949 B
import { listDeployments } from '../sdk.js'; /** * Lists all deployments for the organization. * Uses the SDK to properly handle organization context and API communication. * * @param {object} params - Input parameters * @param {string} [params.appSourcePath] - Directory path for resolving org from dotfile * @returns {Promise<object>} A promise resolving to an object with a content property */ export async function deploymentsTool({ appSourcePath } = {}) { try { // Use SDK method to fetch deployments (SDK handles org resolution internally) const data = await listDeployments({ appSourcePath, }); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: error && error.message ? error.message : String(error), }, ], }; } }