Skip to main content
Glama

Super Shell MCP Server

update_security_level

Modify the security level of a whitelisted command in Super Shell MCP Server, allowing admins to set it as safe, requiring approval, or forbidden for secure execution across Windows, macOS, and Linux.

Instructions

Update the security level of a whitelisted command

Input Schema

NameRequiredDescriptionDefault
commandYesThe command to update
securityLevelYesNew security level for the command

Input Schema (JSON Schema)

{ "properties": { "command": { "description": "The command to update", "type": "string" }, "securityLevel": { "description": "New security level for the command", "enum": [ "safe", "requires_approval", "forbidden" ], "type": "string" } }, "required": [ "command", "securityLevel" ], "type": "object" }

Implementation Reference

  • The primary handler for the 'update_security_level' tool in the MCP server. Validates input using Zod, maps string security level to CommandSecurityLevel enum, delegates to CommandService.updateSecurityLevel, and returns a success message.
    private async handleUpdateSecurityLevel(args: any) { const schema = z.object({ command: z.string(), securityLevel: z.enum(['safe', 'requires_approval', 'forbidden']), }); const { command, securityLevel } = schema.parse(args); // Map string security level to enum const securityLevelEnum = securityLevel === 'safe' ? CommandSecurityLevel.SAFE : securityLevel === 'requires_approval' ? CommandSecurityLevel.REQUIRES_APPROVAL : CommandSecurityLevel.FORBIDDEN; this.commandService.updateSecurityLevel(command, securityLevelEnum); return { content: [ { type: 'text', text: `Security level for command '${command}' updated to '${securityLevel}'`, }, ], }; }
  • Input schema definition for the 'update_security_level' tool, registered in the ListTools handler. Defines required 'command' and 'securityLevel' parameters with enum values.
    name: 'update_security_level', description: 'Update the security level of a whitelisted command', inputSchema: { type: 'object', properties: { command: { type: 'string', description: 'The command to update', }, securityLevel: { type: 'string', enum: ['safe', 'requires_approval', 'forbidden'], description: 'New security level for the command', }, }, required: ['command', 'securityLevel'], }, },
  • src/index.ts:291-292 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching calls to handleUpdateSecurityLevel.
    case 'update_security_level': return await this.handleUpdateSecurityLevel(args);
  • Supporting method in CommandService that updates the securityLevel property of a whitelisted command entry in the internal Map.
    public updateSecurityLevel(command: string, securityLevel: CommandSecurityLevel): void { const entry = this.whitelist.get(command); if (entry) { entry.securityLevel = securityLevel; this.whitelist.set(command, entry); } }

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/cfdude/super-shell-mcp'

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