Skip to main content
Glama

subscribe_default

Subscribe to file monitoring for development by automatically tracking changes in watched.txt, enabling real-time notifications without manual updates.

Instructions

Subscribe to the default watched.txt file for development

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execution logic for the 'subscribe_default' tool within the call_tool_handler function. It subscribes the current session to the default watched.txt file by adding it to the global 'watched' dictionary and notifies if it's a new path.
    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}") ]
  • Registration of the 'subscribe_default' tool in the @server.list_tools() handler, defining its name, description, and empty input schema.
    Tool( name="subscribe_default", description="Subscribe to the default watched.txt file for development", inputSchema={ "type": "object", "properties": {}, "additionalProperties": False, }, ),
  • Input schema for the 'subscribe_default' tool, which requires no parameters.
    inputSchema={ "type": "object", "properties": {}, "additionalProperties": False, },

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/hesreallyhim/mcp-observer-server'

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