UNPKG

tak-server-mcp-skyfi

Version:

Model Context Protocol (MCP) server for TAK Server integration with geospatial support

61 lines 2.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toolRegistry = void 0; // Import all tools const get_events_1 = require("./cot/get-events"); const send_event_1 = require("./cot/send-event"); const subscribe_events_1 = require("./cot/subscribe-events"); const get_entities_1 = require("./entities/get-entities"); const spatial_query_1 = require("./geospatial/spatial-query"); const calculate_distance_1 = require("./geospatial/calculate-distance"); const find_nearest_1 = require("./geospatial/find-nearest"); const create_geofence_1 = require("./geospatial/create-geofence"); const analyze_movement_1 = require("./geospatial/analyze-movement"); // import { getMissionsTool } from './missions/get-missions'; const get_alerts_1 = require("./alerts/get-alerts"); const send_emergency_1 = require("./alerts/send-emergency"); class ToolRegistry { tools = new Map(); constructor() { // Register all tools this.registerTool(get_events_1.getCotEventsTool); this.registerTool(send_event_1.sendCotEventTool); this.registerTool(subscribe_events_1.subscribeEventsTool); this.registerTool(get_entities_1.getEntitiesTool); this.registerTool(spatial_query_1.spatialQueryTool); this.registerTool(calculate_distance_1.calculateDistanceTool); this.registerTool(find_nearest_1.findNearestTool); this.registerTool(create_geofence_1.createGeofenceTool); this.registerTool(analyze_movement_1.analyzeMovementTool); // this.registerTool(getMissionsTool); this.registerTool(get_alerts_1.getAlertsTool); this.registerTool(send_emergency_1.sendEmergencyTool); // this.registerTool(manageDataPackagesTool); } registerTool(tool) { this.tools.set(tool.name, tool); } getTool(name) { return this.tools.get(name); } getAllTools() { return Array.from(this.tools.values()); } getEnabledTools(enabledList) { const tools = this.getAllTools(); if (!enabledList || enabledList.length === 0) { // Return all tools if no filter specified return tools; } // Filter to only enabled tools return tools.filter(tool => enabledList.includes(tool.name)); } getToolsByCategory(category) { return this.getAllTools().filter(tool => tool.category === category); } getReadOnlyTools() { return this.getAllTools().filter(tool => !tool.requiresWrite); } } exports.toolRegistry = new ToolRegistry(); //# sourceMappingURL=registry.js.map