Skip to main content
Glama

unsubscribe

Stop receiving real-time notifications for changes on a specific file or directory by removing the subscription via the MCP Observer Server.

Instructions

Unsubscribe from changes on a file or directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • Handler logic for the 'unsubscribe' tool: removes the current session from the subscribers of the specified path, deletes the path entry if no subscribers remain, and returns appropriate text response.
    elif name == "unsubscribe": assert path_str is not None, "path_str should not be None for unsubscribe tool" p = Path(path_str).expanduser().resolve() subs = watched.get(p) if subs and session in subs: subs.remove(session) if not subs: del watched[p] return [TextContent(type="text", text=f"Unsubscribed from {p}")] return [TextContent(type="text", text=f"Not subscribed to {p}")]
  • Registration of the 'unsubscribe' tool in the list_tools() function, including name, description, and input schema.
    Tool( name="unsubscribe", description="Unsubscribe from changes on a file or directory", inputSchema={ "type": "object", "properties": {"path": {"type": "string"}}, "required": ["path"], }, ),
  • Input schema definition for the 'unsubscribe' tool: requires a 'path' string.
    inputSchema={ "type": "object", "properties": {"path": {"type": "string"}}, "required": ["path"], },

Other Tools

Related Tools

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