Skip to main content
Glama
devlimelabs

MCP Environment & Installation Manager

by devlimelabs

get-profile

Retrieve profile configurations from the MCP Environment & Installation Manager to manage environment variables and server settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileIdYesProfile ID to retrieve

Implementation Reference

  • 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) } ] }; }
  • Input schema for the 'get-profile' tool, defining the required 'profileId' parameter using Zod.
    { profileId: z.string().describe("Profile ID to retrieve") },
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/devlimelabs/mcp-env-manager-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server