get-profile
Retrieve profile-based configurations using a specified Profile ID to streamline environment variable management and server setup automation in the MCP Environment & Installation Manager.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profileId | Yes | Profile ID to retrieve |
Implementation Reference
- src/tools/profile-tools.ts:38-64 (registration)Registration of the 'get-profile' MCP tool, including Zod input schema (profileId: string) and the handler function that fetches the profile via ConfigService, adds isActive flag, and returns JSON text content.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/tools/profile-tools.ts:43-63 (handler)The execution handler for 'get-profile': retrieves profile by ID, throws if not found, marks if active, returns as JSON in MCP content format.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)Zod schema defining the input parameters for the get-profile tool: a required string profileId.{ profileId: z.string().describe("Profile ID to retrieve") },