subscribe_default
Automatically subscribe to the default watched.txt file for development, enabling real-time filesystem event monitoring and notifications through the MCP Observer Server.
Instructions
Subscribe to the default watched.txt file for development
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Handler logic for the 'subscribe_default' tool: subscribes the current session to the default 'watched.txt' file, adds notification if new path, and returns confirmation.elif name == "subscribe_default": default_file = ( Path("src/mcp_observer_server/watched.txt").expanduser().resolve() ) is_new_path = default_file not in watched watched.setdefault(default_file, set()).add(session) # Send notification if this is a new path being watched if is_new_path: asyncio.create_task(send_resources_list_changed_notification()) return [ TextContent(type="text", text=f"Subscribed to default file: {default_file}") ]
- src/mcp_observer_server/server.py:89-97 (registration)Registration of the 'subscribe_default' tool in list_tools(), including name, description, and schema (no input parameters required).Tool( name="subscribe_default", description="Subscribe to the default watched.txt file for development", inputSchema={ "type": "object", "properties": {}, "additionalProperties": False, }, ),
- Input schema for 'subscribe_default' tool: empty object, no properties required.Tool( name="subscribe_default", description="Subscribe to the default watched.txt file for development", inputSchema={ "type": "object", "properties": {}, "additionalProperties": False, }, ),