get_fill_light_size
Retrieve the current fill light area dimensions (width and height) in units for 3D scene lighting. Use before adjusting relative size to maintain accuracy in 3D visualization applications.
Instructions
Get the current fill light area size (width and height in units). Query this before relative size changes to ensure accuracy. For absolute changes, you may use recently queried state from context if no manual interactions occurred.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:1503-1551 (handler)The tool handler for 'get_fill_light_size' - retrieves the current fill light area size (width and height in units) from the browser state and returns it as a formatted text response. The handler gets the current session ID, queries the state using getState(), extracts the fillLight.size (defaults to {width: 1, height: 1}), and formats the response with metadata including timestamp and source.mcpServer.registerTool( 'get_fill_light_size', { title: 'Get Fill Light Size', description: 'Get the current fill light area size (width and height in units). ' + 'Query this before relative size changes to ensure accuracy. ' + 'For absolute changes, you may use recently queried state from context if no manual interactions occurred.', inputSchema: {} }, async () => { const sessionId = getCurrentSessionId(); if (!sessionId) { return { content: [ { type: 'text', text: 'Error: No active session found.' } ], isError: true }; } try { const { state, metadata } = await getState(sessionId); const size = state.fillLight?.size || { width: 1, height: 1 }; const sizeText = `width ${size.width}, height ${size.height}`; return { content: [ { type: 'text', text: formatStateResponse(sizeText, 'Fill light size', sessionId, metadata) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving fill light size: ${error.message}` } ], isError: true }; } } );
- server.js:1503-1551 (registration)Registration of the 'get_fill_light_size' tool using mcpServer.registerTool(), including title, description, and empty input schema (no parameters required).mcpServer.registerTool( 'get_fill_light_size', { title: 'Get Fill Light Size', description: 'Get the current fill light area size (width and height in units). ' + 'Query this before relative size changes to ensure accuracy. ' + 'For absolute changes, you may use recently queried state from context if no manual interactions occurred.', inputSchema: {} }, async () => { const sessionId = getCurrentSessionId(); if (!sessionId) { return { content: [ { type: 'text', text: 'Error: No active session found.' } ], isError: true }; } try { const { state, metadata } = await getState(sessionId); const size = state.fillLight?.size || { width: 1, height: 1 }; const sizeText = `width ${size.width}, height ${size.height}`; return { content: [ { type: 'text', text: formatStateResponse(sizeText, 'Fill light size', sessionId, metadata) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving fill light size: ${error.message}` } ], isError: true }; } } );