diff --git a/config/boost.php b/config/boost.php index d99e4c6..7a57260 100644 --- a/config/boost.php +++ b/config/boost.php @@ -29,4 +29,17 @@ 'browser_logs_watcher' => env('BOOST_BROWSER_LOGS_WATCHER', true), + /* + |-------------------------------------------------------------------------- + | MCP + |-------------------------------------------------------------------------- + | + | This option may be used to configure the MCP settings for Boost. + | + */ + 'mcp' => [ + 'tinker' => [ + 'memory_limit' => env('BOOST_TINKER_MEMORY_LIMIT', '128M'), + ], + ] ]; diff --git a/src/Mcp/Tools/Tinker.php b/src/Mcp/Tools/Tinker.php index 73a4fa5..739ba0b 100644 --- a/src/Mcp/Tools/Tinker.php +++ b/src/Mcp/Tools/Tinker.php @@ -44,7 +44,8 @@ public function handle(array $arguments): ToolResult $timeout = min(180, (int) (Arr::get($arguments, 'timeout', 30))); set_time_limit($timeout); - ini_set('memory_limit', '128M'); + $memoryLimit = config('boost.mcp.tinker.memory_limit', '128M'); + ini_set('memory_limit', $memoryLimit); // Use PCNTL alarm for additional timeout control if available (Unix only) if (function_exists('pcntl_async_signals') && function_exists('pcntl_signal')) {