Skip to main content
Glama

remove_watch

Remove a watch expression from Xdebug debugging sessions to stop monitoring specific variables or conditions during PHP application debugging.

Instructions

Remove a watch expression

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
watch_idYesWatch ID to remove

Implementation Reference

  • Full MCP tool registration, schema, and handler for 'remove_watch'. The handler removes the watch using ctx.watchManager.removeWatch(watch_id) and returns a JSON response indicating success.
    server.tool( 'remove_watch', 'Remove a watch expression', { watch_id: z.string().describe('Watch ID to remove'), }, async ({ watch_id }) => { const success = ctx.watchManager.removeWatch(watch_id); return { content: [ { type: 'text', text: JSON.stringify({ success, watch_id }), }, ], }; } );
  • The WatchManager.removeWatch(id) method that implements the core logic of removing a watch expression by deleting it from the internal watches Map.
    removeWatch(id: string): boolean { const removed = this.watches.delete(id); if (removed) { logger.debug(`Watch removed: ${id}`); } return removed; }

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/kpanuragh/xdebug-mcp'

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