get-active-profile
Retrieve the currently active configuration profile to manage environment variables and server settings within the MCP Environment & Installation Manager.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/profile-tools.ts:199-230 (handler)The core handler function for the 'get-active-profile' tool. It retrieves the active profile using configService.getActiveProfile() and returns a JSON-formatted response with the profile details or a flag indicating no active profile exists.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/server.ts:32-32 (registration)Top-level registration call that invokes registerProfileTools, which in turn registers the 'get-active-profile' tool along with other profile tools on the MCP server.registerProfileTools(server, configService);
- src/tools/profile-tools.ts:199-230 (registration)Direct registration of the 'get-active-profile' tool via server.tool call within the registerProfileTools function.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) } ] }; } );