SwitchScene
Switch the OBS program scene automatically by specifying the scene name. Integrates with the Presentation Buddy MCP Server to streamline live production for solo creators.
Instructions
Switches the current OBS program scene.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- src/index.ts:392-415 (handler)The handler logic for the 'SwitchScene' tool. It extracts the scene name from the input parameters, validates it, and sends an OBS WebSocket request to 'SetCurrentProgramScene' with the sceneName to switch the current program scene.case "SwitchScene": console.log("SwitchScene params:", JSON.stringify(params, null, 2)); // Extract the scene name from the parameters const sceneName = params.scene || (params.params && params.params.scene); console.log("Extracted sceneName:", sceneName); if (!sceneName) { throw new Error("No scene name provided"); } try { // NOTE: Changed from SetCurrentProgramScene to use the direct parameters expected by OBS obsResponseData = await sendToObs( "SetCurrentProgramScene", { "sceneName": sceneName }, // Make sure we use the exact field name OBS expects context, action.name ); console.log("OBS response:", JSON.stringify(obsResponseData, null, 2)); } catch (error) { console.error("OBS error:", error); throw error; } break;