sbox-mcp-plus
kitsupanic kitsupanic Library update 10d ago

sbox-mcp-plus

Extra MCP tools for the s&box editor — scene tab switching, correct editor status, and UI-safe screenshots. Drop-in library,

hard_drive 1 MB folder 5 files build Engine v28
open_in_new View on sbox.game

About This Package

x_open_scene

Make a scene the active editor tab, opening it from its asset path if it isn't open yet. Accepts a scene name or resource path as list_scenes reports them.

Why it exists: the stock toolset can read and list background scenes but can't switch which one is active, and every mutating tool (set_component, save_scene, undo) targets the active scene. Worse, an edit aimed at a background scene mutates the object but the dirty flag lands on the active tab — the background scene reloads from disk on focus and the edit is silently lost. Upstream: issue #11637, PR #11638 (open).
  • Explicit no-op message when the scene is already the active tab.
  • Refuses during play mode — play_stop first.
  • Refuses the running game session (it has no tab to switch to).
x_editor_status

What the editor is doing right now, from the editor's point of view: active scene tab name and path, unsaved-changes flag, open tab count, project ident, play/pause state.

Why it exists: the built-in editor_status reports the game scene handle, not the active editor tab — while editing it returns a placeholder name ("Scene") and a null path, and its dirty flag can describe a different scene than its name. Upstream: issue #11639, PR #11640 (closed unmerged). x_editor_status reads SceneEditorSession.Active — the same source list_scenes uses — so the two always agree.

Fields the built-in reports that this tool deliberately omits (tool count, compile status, engine paths): they come from engine-internal API a library can't reach, and the built-in editor_status still reports them correctly — use both.

x_camera_screenshot

Render a scene camera to an image with UI text intact. Same arguments as the built-in camera_screenshotcamera (a CameraComponent id, its game object's id, or empty for the scene's main camera), width, height, includeUi — so it's a drop-in swap.

Why it exists: the built-in camera_screenshot renders every Razor text label as a flat gray rectangle at any size other than the live viewport's. Upstream: issue #11585. Engine root cause: CameraComponent.ResizeUI relayouts each screen panel for the offscreen size but omits RootPanel.BuildDescriptors(), so labels resized by that relayout release their text texture while the render descriptors still point at the dead one — ScreenshotService has the correct sequence (PreLayout/CalculateLayout/PostLayout/BuildDescriptors).

In play mode x_camera_screenshot sidesteps it by capturing at exactly the current screen size, where the relayout changes no panel's size and no texture is released, then downscaling the capture to the requested dimensions. In edit mode there is no game viewport, so no live screen-size UI exists whose text textures a relayout could destroy, and it renders directly at the requested size — full detail, no resize step. Either way it works wherever camera_screenshot does.

Media

No usage statistics available
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
Package ID: kitsupanic.sbox_mcp_plus
Created: 2026-08-14 16:05 UTC
Updated: 2026-08-14 16:06 UTC
Type: library
Public: Yes
Version: 341820
files: 5
Size: 0.9 MB
Engine Version: 28
Asset Version ID: 341820
Version Created: 2026-08-14 16:06 UTC
Hash: 1786723572
Manifest: Open manifest
Resources:
Code Package References:
new_releases Latest Update Aug 14, 2026
Changes on 2026-08-14
341820 Aug 14, 2026
Changes on 2026-08-14
341805 Aug 14, 2026
Changes on 2026-08-14