get_camera_fov
Retrieve the current camera field of view value to enable accurate adjustments in 3D visualization applications. Query before making relative FOV changes to maintain precision.
Instructions
Get the current camera field of view (FOV) value. Query this before relative FOV 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:1759-1806 (registration)Registration and handler for get_camera_fov tool - registered with mcpServer.registerTool, queries camera FOV state from browser via getState() and returns formatted response with metadatamcpServer.registerTool( 'get_camera_fov', { title: 'Get Camera Field of View', description: 'Get the current camera field of view (FOV) value. ' + 'Query this before relative FOV 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 fov = state.camera?.fov ?? 0; return { content: [ { type: 'text', text: formatStateResponse(fov.toString(), 'Camera FOV', sessionId, metadata) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving camera FOV: ${error.message}` } ], isError: true }; } } );