activate-profile
Activate a specific configuration profile in the MCP Environment & Installation Manager to switch between different environment setups and server configurations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profileId | Yes | Profile ID to activate |
Implementation Reference
- src/tools/profile-tools.ts:177-195 (handler)The handler function for the 'activate-profile' tool. Validates the profileId and calls ConfigService.setActiveProfile, returning a success JSON response.async ({ profileId }, extra) => { if (!profileId.trim()) { throw new Error("Profile ID cannot be empty"); } await configService.setActiveProfile(profileId); return { content: [ { type: "text", text: JSON.stringify({ success: true, profileId }, null, 2) } ] }; }
- src/tools/profile-tools.ts:174-176 (schema)Zod input schema defining the required profileId parameter for the activate-profile tool.{ profileId: z.string().describe("Profile ID to activate") },
- src/tools/profile-tools.ts:172-196 (registration)Direct registration of the 'activate-profile' tool using server.tool, including schema and handler.server.tool( "activate-profile", { profileId: z.string().describe("Profile ID to activate") }, async ({ profileId }, extra) => { if (!profileId.trim()) { throw new Error("Profile ID cannot be empty"); } await configService.setActiveProfile(profileId); return { content: [ { type: "text", text: JSON.stringify({ success: true, profileId }, null, 2) } ] }; } );
- ConfigService method that validates the profile exists, sets it as active in memory, and persists the profiles config to disk.async setActiveProfile(id: string): Promise<void> { const profile = this.getProfile(id); if (!profile) { throw new Error(`Profile not found: ${id}`); } this.profilesConfig.activeProfile = id; await this.saveProfiles(); }
- src/server.ts:32-32 (registration)Invocation of registerProfileTools which registers the activate-profile tool among others.registerProfileTools(server, configService);