Skip to main content
Glama

Shell-MCP

by kevinwatt
errors.ts1.19 kB
export class BaseError extends Error { constructor(message: string) { super(message); this.name = this.constructor.name; } } export class CommandValidationError extends BaseError { constructor( public readonly command: string, public readonly reason: string ) { super(`Command validation failed (${command}): ${reason}`); } } export class CommandExecutionError extends BaseError { constructor( public readonly command: string, public readonly exitCode: number, public readonly stderr: string ) { super(`Command execution failed (${command}): exit code ${exitCode}`); } } export class CommandTimeoutError extends BaseError { constructor( public readonly command: string, public readonly timeout: number ) { super(`Command execution timeout (${command}): ${timeout}ms`); } } export class SecurityError extends BaseError { constructor(message: string) { super(`Security check failed: ${message}`); } } export class ToolError extends Error { constructor( public readonly code: string, message: string, public readonly details?: unknown ) { super(message); this.name = 'ToolError'; } }

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

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