list_watched_files
Display all log files currently under active monitoring for real-time analysis and debugging purposes.
Instructions
List all currently monitored log files
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:406-413 (handler)MCP tool handler for 'list_watched_files' that delegates to FileWatcher.listWatchedFiles() and formats the response as MCPToolResult.private async handleListWatchedFiles(args: any): Promise<MCPToolResult> { const watchedFiles = await this.fileWatcher.listWatchedFiles(); return { success: true, data: watchedFiles }; }
- src/server.ts:139-142 (schema)Input schema definition for the tool (empty object since no parameters required).inputSchema: { type: 'object', properties: {} }
- src/server.ts:136-143 (registration)Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema.{ name: 'list_watched_files', description: 'List all currently monitored log files', inputSchema: { type: 'object', properties: {} } },
- src/tools/fileWatcher.ts:89-102 (helper)Helper method in FileWatcher class that lists all watched files with their status, recent errors count, and last update time.async listWatchedFiles(): Promise<FileWatchResult[]> { const results: FileWatchResult[] = []; for (const [filePath, watchedFile] of this.watchers) { results.push({ filePath, newErrors: watchedFile.errors.slice(-5), // Last 5 errors totalErrors: watchedFile.errors.length, lastUpdate: watchedFile.lastUpdate }); } return results; }
- src/server.ts:189-191 (registration)Dispatch/registration case in the CallToolRequestSchema switch statement that routes to the handler.case 'list_watched_files': result = await this.handleListWatchedFiles(args); break;