Studio's MCP `execute_luau` can no longer require ModuleScripts

On Studio version 0.741.19, code run through the built-in Studio MCP server’s execute_luau tool runs in a “capability-restricted” thread. It can no longer require any unsandboxed ModuleScript in the place, and _G is nil. This used to work earlier. Additionally, as I’m creating a place for reproduction, creating a ModuleScript and parenting it to ReplicatedStorage from execute_luau fails with the same capability error, naming ReplicatedStorage.

The error when running the tool call:

{
  "tool": "execute_luau",
  "arguments": {
    "datamodel_type": "Edit",
    "studio_id": "<your studio id here>",
    "code": "local m = game:GetService(\"ReplicatedStorage\").ModuleScript\nlocal ok, result = pcall(function() return require(m) end)\nlocal okS, sandboxed = pcall(function() return m.Sandboxed end)\nreturn \"sandboxed \" .. tostring(okS and sandboxed) .. \" | require ok \" .. tostring(ok) .. \" | \" .. (ok and (\"value \" .. tostring(result.value)) or tostring(result)) .. \" | _G \" .. tostring(_G ~= nil) .. \" | version \" .. version()"
  }
}

Returns:

The current thread cannot require 'ModuleScript' since 'ModuleScript' has additional values for the Capabilities property: LoadUnownedAsset (and 3 more)

test.rbxl (69.0 KB)

2 Likes