hooks_stop_watching
Stop file system watching to manage resources effectively within the CastPlan MCP server, optimizing AI assistant performance for context-aware development support.
Instructions
Stop file system watching
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/hooks/index.ts:90-93 (handler)The MCP tool handler for 'hooks_stop_watching'. It calls HooksService.stopFileWatching() to stop file system watching and returns a standardized success response.tools.set('hooks_stop_watching', async () => { await hooksService.stopFileWatching(); return { success: true, message: 'File watching stopped' }; });
- src/tools/hooks/index.ts:58-66 (schema)The input schema definition for the 'hooks_stop_watching' tool, specifying no required input parameters.{ name: 'hooks_stop_watching', description: 'Stop file system watching', inputSchema: { type: 'object', properties: {}, required: [] } }
- src/services/HooksService.ts:323-330 (helper)The underlying helper method in HooksService that iterates over all active file watchers, closes them, removes from the map, and notifies the system.async stopFileWatching(): Promise<void> { const watcherEntries = Array.from(this.watchers.entries()); for (const [name, watcher] of watcherEntries) { await watcher.close(); this.watchers.delete(name); } await this.notify('system', 'File watching stopped'); }
- src/tools/hooks/index.ts:90-93 (registration)Registration of the 'hooks_stop_watching' tool handler into the tools Map within the registerHooksTools function.tools.set('hooks_stop_watching', async () => { await hooksService.stopFileWatching(); return { success: true, message: 'File watching stopped' }; });