Rotate Fill Light Counterclockwise
rotate_fill_light_counterclockwiseRotate the fill light counterclockwise to increase azimuth. Automatically adjusts from current position for precise lighting control.
Instructions
Rotate the fill light counterclockwise (increases azimuth) relative to current position. This tool automatically queries fresh state before performing the rotation to ensure accuracy, even if the user has manually moved the light.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| degrees | No | Amount to rotate in degrees (defaults to 10°) |
Implementation Reference
- server.js:2562-2596 (handler)Handler function for the 'rotate_fill_light_counterclockwise' tool. Queries fresh state from the browser for the fill light position, then sends a 'rotateFillLightCounterclockwise' command to the browser. Responds with text describing the rotation (defaults to 10° if degrees not provided).
async ({ degrees }) => { const sessionId = getCurrentSessionId(); if (!sessionId) { return { content: [ { type: 'text', text: 'Error: No active session found.' } ], isError: true }; } // Query fresh state before manipulation const state = await queryFreshStateForManipulation(sessionId); const currentPosition = state?.fillLight?.position || { azimuth: 0, elevation: 0, distance: 0 }; const positionInfo = ` (from current azimuth: ${currentPosition.azimuth}°)`; routeToCurrentSession({ type: 'rotateFillLightCounterclockwise', degrees: degrees }); return { content: [ { type: 'text', text: degrees ? `Fill light rotated ${degrees}° counterclockwise${positionInfo}` : `Fill light rotated 10° counterclockwise${positionInfo}` } ] }; } - server.js:2551-2597 (registration)Registration of the 'rotate_fill_light_counterclockwise' tool with MCP server. Defines the tool name, title 'Rotate Fill Light Counterclockwise', description explaining it rotates the fill light counterclockwise (increases azimuth), and an optional 'degrees' input schema (positive number, defaults to 10°).
mcpServer.registerTool( 'rotate_fill_light_counterclockwise', { title: 'Rotate Fill Light Counterclockwise', description: 'Rotate the fill light counterclockwise (increases azimuth) relative to current position. ' + 'This tool automatically queries fresh state before performing the rotation to ensure accuracy, ' + 'even if the user has manually moved the light.', inputSchema: { degrees: z.number().positive().optional().describe('Amount to rotate in degrees (defaults to 10°)') } }, async ({ degrees }) => { const sessionId = getCurrentSessionId(); if (!sessionId) { return { content: [ { type: 'text', text: 'Error: No active session found.' } ], isError: true }; } // Query fresh state before manipulation const state = await queryFreshStateForManipulation(sessionId); const currentPosition = state?.fillLight?.position || { azimuth: 0, elevation: 0, distance: 0 }; const positionInfo = ` (from current azimuth: ${currentPosition.azimuth}°)`; routeToCurrentSession({ type: 'rotateFillLightCounterclockwise', degrees: degrees }); return { content: [ { type: 'text', text: degrees ? `Fill light rotated ${degrees}° counterclockwise${positionInfo}` : `Fill light rotated 10° counterclockwise${positionInfo}` } ] }; } ); - server.js:2558-2559 (schema)Input schema for the tool: an optional 'degrees' parameter which is a positive number with default of 10°.
inputSchema: { degrees: z.number().positive().optional().describe('Amount to rotate in degrees (defaults to 10°)')