@akiojin/unity-mcp-server
Version:
MCP server and Unity Editor bridge — enables AI assistants to control Unity for AI-assisted workflows
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);
}
}