Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 }; } } );

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/aidenlab/hello3dmcp-server'

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