import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import * as fileTools from './fileTools';
import * as searchTools from './searchTools';
import * as commandTools from './commandTools';
import * as systemTools from './systemTools';
import * as automationTools from './automationTools';
import * as kvTools from './kvTools';
/**
* Register all MVP tools with the MCP server
*/
export async function registerAllTools(server: McpServer): Promise<void> {
// File System Tools - using any due to MCP SDK type compatibility
(server as any).tool(
'list_files',
'List files in a directory with optional recursive search',
fileTools.ListFilesInputSchema,
fileTools.listFilesTool
);
(server as any).tool(
'read_file',
'Read the contents of a file',
fileTools.ReadFileInputSchema,
fileTools.readFileTool
);
(server as any).tool(
'write_file',
'Write content to a file (creates if not exists)',
fileTools.WriteFileInputSchema,
fileTools.writeFileTool
);
(server as any).tool(
'delete_file',
'Delete a file or directory',
fileTools.DeleteFileInputSchema,
fileTools.deleteFileTool
);
(server as any).tool(
'move_file',
'Move or rename a file',
fileTools.MoveFileInputSchema,
fileTools.moveFileTool
);
// Search Tools
(server as any).tool(
'search_files',
'Search for files by name in a directory',
searchTools.SearchFilesInputSchema,
searchTools.searchFilesTool
);
(server as any).tool(
'search_content',
'Search for text content within files',
searchTools.SearchContentInputSchema,
searchTools.searchContentTool
);
// Command Execution Tools
(server as any).tool(
'run_command',
'Run a shell command (from allow-list only)',
commandTools.RunCommandInputSchema,
commandTools.runCommandTool
);
(server as any).tool(
'list_allowed_commands',
'List all allowed shell commands',
commandTools.ListCommandsInputSchema,
commandTools.listCommandsTool
);
// System Tools
(server as any).tool(
'launch_app',
'Launch an application (platform-aware)',
systemTools.LaunchAppInputSchema,
systemTools.launchAppTool
);
(server as any).tool(
'get_clipboard',
'Get clipboard contents (platform-aware)',
systemTools.GetClipboardInputSchema,
systemTools.getClipboardTool
);
(server as any).tool(
'set_clipboard',
'Set clipboard contents (platform-aware)',
systemTools.SetClipboardInputSchema,
systemTools.setClipboardTool
);
// Automation Tools
(server as any).tool(
'create_folder_structure',
'Create nested folder structure from a specification',
automationTools.CreateFolderStructureInputSchema,
automationTools.createFolderStructureTool
);
(server as any).tool(
'bulk_rename',
'Rename multiple files with prefix/suffix',
automationTools.BulkRenameInputSchema,
automationTools.bulkRenameTool
);
(server as any).tool(
'cleanup_desktop',
'Organize desktop files into folders by type',
automationTools.CleanupDesktopInputSchema,
automationTools.cleanupDesktopTool
);
// KV Store Tools
(server as any).tool(
'kv_get',
'Retrieve a value from the local key-value store',
kvTools.KVGetInputSchema,
kvTools.kvGetTool
);
(server as any).tool(
'kv_set',
'Store a key-value pair in the local store',
kvTools.KVSetInputSchema,
kvTools.kvSetTool
);
(server as any).tool(
'kv_delete',
'Delete a key from the local store',
kvTools.KVDeleteInputSchema,
kvTools.kvDeleteTool
);
(server as any).tool(
'kv_list',
'List all keys in the local store',
kvTools.KVListInputSchema,
kvTools.kvListTool
);
(server as any).tool(
'kv_clear',
'Clear all data from the local store',
kvTools.KVClearInputSchema,
kvTools.kvClearTool
);
}