Skip to main content
Glama
yshk-mrt

Presentation Buddy MCP Server

by yshk-mrt

SetSourcePosition

Adjust the position of visual elements in streaming scenes by specifying X and Y coordinates to control layout and presentation flow.

Instructions

Sets the position of a source in a scene.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The handler logic for the 'SetSourcePosition' MCP tool. It extracts scene name, source name, x and y positions from input parameters. It first retrieves the sceneItemId using OBS 'GetSceneItemId' request, then applies the new position using 'SetSceneItemTransform' with positionX and positionY in the sceneItemTransform object.
    case "SetSourcePosition":
        console.log("SetSourcePosition params:", JSON.stringify(params, null, 2));
        // Extract parameters
        const posSceneName = params.scene || (params.params && params.params.scene);
        const posSourceName = params.source || (params.params && params.params.source);
        const xPos = params.x !== undefined ? params.x : 
                   (params.params && params.params.x !== undefined ? params.params.x : null);
        const yPos = params.y !== undefined ? params.y : 
                   (params.params && params.params.y !== undefined ? params.params.y : null);
        
        if (!posSceneName || !posSourceName || xPos === null || yPos === null) {
            throw new Error("Missing required parameters: scene, source, x, or y");
        }
        
        console.log(`Setting position for source "${posSourceName}" in scene "${posSceneName}" to: x=${xPos}, y=${yPos}`);
        
        try {
            // First get the scene item ID
            const posItemIdResponse = await sendToObs<{ sceneItemId: number }>(
                "GetSceneItemId",
                { sceneName: posSceneName, sourceName: posSourceName },
                context,
                action.name
            );
            
            // Then set the position
            obsResponseData = await sendToObs(
                "SetSceneItemTransform",
                { 
                    sceneName: posSceneName, 
                    sceneItemId: posItemIdResponse.sceneItemId,
                    sceneItemTransform: {
                        positionX: xPos,
                        positionY: yPos
                    }
                },
                context,
                action.name
            );
            console.log("SetSourcePosition response:", JSON.stringify(obsResponseData, null, 2));
        } catch (error) {
            console.error("Error setting source position:", error);
            throw error;
        }
        break;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states 'Sets' implying a mutation, but doesn't disclose behavioral traits such as required permissions, whether the change is immediate or reversible, error conditions, or effects on other scene elements. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation with multiple parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what happens after setting the position, potential side effects, or error handling, leaving significant gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter semantics beyond the input schema, which has 0% description coverage (no parameter descriptions). However, the schema defines parameters clearly (scene, source, x, y), so the baseline is 3 as the schema provides structure, but the description fails to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Sets') and the target ('position of a source in a scene'), making the purpose understandable. However, it doesn't differentiate from sibling tools like SetSourceScale or SetSourceVisibility, which also modify source properties, so it lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing scene and source), exclusions, or comparisons to similar tools like SetSourceScale, leaving the agent without usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/yshk-mrt/obs-mcp'

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