Skip to main content
Glama
devlimelabs

MCP Environment & Installation Manager

by devlimelabs

delete-env-var

Remove a specific environment variable from a profile in the MCP Environment & Installation Manager, ensuring clean and precise configuration management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesEnvironment variable key
profileIdYesProfile ID to delete environment variable from

Implementation Reference

  • Registration of the 'delete-env-var' MCP tool, including input schema and inline handler function that validates parameters, checks profile existence, calls ConfigService.deleteEnvVar, and returns a success response.
    server.tool( "delete-env-var", { profileId: z.string().describe("Profile ID to delete environment variable from"), key: z.string().describe("Environment variable key") }, async ({ profileId, key }, extra) => { if (!profileId.trim()) { throw new Error("Profile ID cannot be empty"); } if (!key.trim()) { throw new Error("Environment variable key cannot be empty"); } const profile = configService.getProfile(profileId); if (!profile) { throw new Error(`Profile not found: ${profileId}`); } configService.deleteEnvVar(profileId, key); return { content: [ { type: "text", text: JSON.stringify({ success: true, profileId, key }, null, 2) } ] }; } );
  • Helper method in ConfigService that implements the core deletion logic: retrieves env vars for profile, validates key exists, deletes the key, and persists to storage.
    deleteEnvVar(profileId: string, key: string): void { const vars = this.getEnvVars(profileId); if (!vars[key]) { throw new Error(`Environment variable not found: ${key}`); } delete vars[key]; this.envStore.set(profileId, vars); }
  • Zod input schema defining profileId and key parameters for the delete-env-var tool.
    { profileId: z.string().describe("Profile ID to delete environment variable from"), key: z.string().describe("Environment variable key")

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