Skip to main content
Glama

hooks_stop_watching

Stop monitoring file system changes to conserve resources when project tracking is no longer needed.

Instructions

Stop file system watching

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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' };
    });
  • 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);
  • 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');
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ghostseller/CastPlan_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server