Skip to main content
Glama

list_sources

Retrieve all scene items from the current or specified scene in OBS Studio to manage and organize your streaming setup.

Instructions

List all sources (scene items) in a scene. Defaults to the current scene.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_nameNoScene name. Omit to use the current program scene.

Implementation Reference

  • The handler logic for the 'list_sources' tool, which fetches scene items for a given or current scene.
    case "list_sources": {
      let sceneName = args.scene_name;
      if (!sceneName) {
        const { currentProgramSceneName } = await obs.call("GetSceneList");
        sceneName = currentProgramSceneName;
      }
      const { sceneItems } = await obs.call("GetSceneItemList", { sceneName });
      return ok({
        scene: sceneName,
        sources: sceneItems.map((item) => ({
          id: item.sceneItemId,
          name: item.sourceName,
          type: item.sourceType,
          kind: item.inputKind ?? null,
          visible: item.sceneItemEnabled,
        })),
      });
    }
  • The registration/definition of the 'list_sources' tool in the TOOLS array.
      name: "list_sources",
      description:
        "List all sources (scene items) in a scene. Defaults to the current scene.",
      inputSchema: {
        type: "object",
        properties: {
          scene_name: {
            type: "string",
            description: "Scene name. Omit to use the current program scene.",
          },
        },
      },
    },

Latest Blog Posts

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/LarsCanGit/OBS-MCP'

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