get-active-profile
Retrieve the currently active profile for configuration management in the MCP server, enabling streamlined environment and package setup.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/profile-tools.ts:198-230 (registration)Registration of the 'get-active-profile' MCP tool, including the inline handler function that retrieves and returns the active profile details via configService.getActiveProfile().// Get active profile server.tool( "get-active-profile", {}, async (_, extra) => { const activeProfile = configService.getActiveProfile(); if (!activeProfile) { return { content: [ { type: "text", text: JSON.stringify({ hasActiveProfile: false }, null, 2) } ] }; } return { content: [ { type: "text", text: JSON.stringify({ hasActiveProfile: true, profile: activeProfile }, null, 2) } ] }; } );
- src/tools/profile-tools.ts:202-229 (handler)The core handler logic for the 'get-active-profile' tool. Fetches the active profile from the ConfigService and formats it as a JSON response in the MCP content format.async (_, extra) => { const activeProfile = configService.getActiveProfile(); if (!activeProfile) { return { content: [ { type: "text", text: JSON.stringify({ hasActiveProfile: false }, null, 2) } ] }; } return { content: [ { type: "text", text: JSON.stringify({ hasActiveProfile: true, profile: activeProfile }, null, 2) } ] }; }