Skip to main content
Glama
cfdude

Super Shell MCP Server

update_security_level

Modify the security classification of approved shell commands to control execution permissions across operating systems.

Instructions

Update the security level of a whitelisted command

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe command to update
securityLevelYesNew security level for the command

Implementation Reference

  • MCP tool handler for 'update_security_level': validates input with Zod schema, maps string security level to CommandSecurityLevel enum, calls CommandService.updateSecurityLevel, and returns 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}'`, }, ], }; }
  • Core helper method in CommandService that updates the security level of a whitelisted command by modifying the entry in the internal whitelist Map.
    public updateSecurityLevel(command: string, securityLevel: CommandSecurityLevel): void { const entry = this.whitelist.get(command); if (entry) { entry.securityLevel = securityLevel; this.whitelist.set(command, entry); } }
  • src/index.ts:201-219 (registration)
    Registration of the 'update_security_level' tool in the MCP server's listTools response, including name, description, and input schema.
    { 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'], }, },
  • Type definition enum for CommandSecurityLevel used throughout the security system.
    export enum CommandSecurityLevel { /** Safe commands that can be executed without approval */ SAFE = 'safe', /** Commands that require approval before execution */ REQUIRES_APPROVAL = 'requires_approval', /** Commands that are explicitly forbidden */ FORBIDDEN = 'forbidden'

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