UNPKG

@akiojin/unity-mcp-server

Version:

MCP server and Unity Editor bridge — enables AI assistants to control Unity for AI-assisted workflows

31 lines (28 loc) 827 B
/** * Handler for querying video capture status in Unity Editor (via MCP) */ import { BaseToolHandler } from '../base/BaseToolHandler.js'; export class CaptureVideoStatusToolHandler extends BaseToolHandler { constructor(unityConnection) { super( 'capture_video_status', 'Get current video recording status.', { type: 'object', properties: {} } ); this.unityConnection = unityConnection; } /** @override */ async execute(params, context) { const response = await this.unityConnection.sendCommand('capture_video_status', params || {}); if (response.error) { return { error: response.error, code: response.code || 'UNITY_ERROR' }; } return { ...response, message: response.message || 'Video recording status retrieved' }; } }