get-profile
Retrieve profile configurations from the MCP Environment & Installation Manager to manage environment variables and server settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profileId | Yes | Profile ID to retrieve |
Implementation Reference
- src/tools/profile-tools.ts:43-63 (handler)The core handler function for the 'get-profile' tool. It retrieves the profile by ID from the ConfigService, determines if it's active, adds the isActive flag, and returns a formatted JSON response.async ({ profileId }, extra) => { const profile = configService.getProfile(profileId); if (!profile) { throw new Error(`Profile not found: ${profileId}`); } const activeProfileId = configService.getActiveProfileId(); return { content: [ { type: "text", text: JSON.stringify({ ...profile, isActive: profile.id === activeProfileId }, null, 2) } ] }; }
- src/tools/profile-tools.ts:40-42 (schema)Input schema for the 'get-profile' tool, defining the required 'profileId' parameter using Zod.{ profileId: z.string().describe("Profile ID to retrieve") },
- src/tools/profile-tools.ts:38-64 (registration)Registration of the 'get-profile' tool on the MCP server within the registerProfileTools function.server.tool( "get-profile", { profileId: z.string().describe("Profile ID to retrieve") }, async ({ profileId }, extra) => { const profile = configService.getProfile(profileId); if (!profile) { throw new Error(`Profile not found: ${profileId}`); } const activeProfileId = configService.getActiveProfileId(); return { content: [ { type: "text", text: JSON.stringify({ ...profile, isActive: profile.id === activeProfileId }, null, 2) } ] }; } );
- src/server.ts:32-32 (registration)Top-level call to register all profile tools, including 'get-profile', during server initialization.registerProfileTools(server, configService);