Skip to main content
Glama
devlimelabs

MCP Environment & Installation Manager

by devlimelabs

get-active-profile

Retrieve the currently active profile for configuration management in the MCP server, enabling streamlined environment and package setup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get-active-profile' MCP tool, including the inline handler function that retrieves and returns the active profile details via configService.getActiveProfile().
    // Get active profile 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) } ] }; } );
  • The core handler logic for the 'get-active-profile' tool. Fetches the active profile from the ConfigService and formats it as a JSON response in the MCP content format.
    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) } ] }; }

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