@akiojin/unity-editor-mcp
Version:
MCP server for Unity Editor integration - enables AI assistants to control Unity Editor
20 lines (18 loc) • 623 B
JavaScript
import { BaseToolHandler } from '../base/BaseToolHandler.js';
import { findByComponentToolDefinition, findByComponentHandler } from '../../tools/analysis/findByComponent.js';
/**
* Handler for the find_by_component tool
*/
export class FindByComponentToolHandler extends BaseToolHandler {
constructor(unityConnection) {
super(
findByComponentToolDefinition.name,
findByComponentToolDefinition.description,
findByComponentToolDefinition.inputSchema
);
this.unityConnection = unityConnection;
}
async execute(args) {
return findByComponentHandler(this.unityConnection, args);
}
}