UNPKG

@akiojin/unity-editor-mcp

Version:

MCP server for Unity Editor integration - enables AI assistants to control Unity Editor

20 lines (18 loc) 659 B
import { BaseToolHandler } from '../base/BaseToolHandler.js'; import { getObjectReferencesToolDefinition, getObjectReferencesHandler } from '../../tools/analysis/getObjectReferences.js'; /** * Handler for the get_object_references tool */ export class GetObjectReferencesToolHandler extends BaseToolHandler { constructor(unityConnection) { super( getObjectReferencesToolDefinition.name, getObjectReferencesToolDefinition.description, getObjectReferencesToolDefinition.inputSchema ); this.unityConnection = unityConnection; } async execute(args) { return getObjectReferencesHandler(this.unityConnection, args); } }