hooks_stop_watching
Stop monitoring file system changes to conserve resources when project tracking is no longer needed.
Instructions
Stop file system watching
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "hooks_stop_watching"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/hooks/index.ts:90-93 (handler)Tool handler that invokes the HooksService to stop file watching and returns a 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)Schema definition for the hooks_stop_watching tool, specifying no input parameters required.
{ name: 'hooks_stop_watching', description: 'Stop file system watching', inputSchema: { type: 'object', properties: {}, required: [] } } - src/index.ts:415-417 (registration)Top-level registration of hooks tools in the main MCP server class, adding them to the tools map and tool definitions.
if (this.config.services.hooks && this.hooksService) { const hookTools = registerHooksTools(this.tools, this.hooksService); this.toolDefinitions.push(...hookTools); - src/services/HooksService.ts:323-330 (helper)Implementation of stopFileWatching method in HooksService that iterates over watchers, closes them, removes from map, and sends notification.
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'); }