Skip to main content
Glama
simen
by simen

listWatchpoints

View active memory watchpoints in the VICE C64 emulator to monitor specific memory addresses during debugging sessions.

Instructions

List all active memory watchpoints.

Shows watchpoint IDs, address ranges, type (load/store), and status.

Related tools: setWatchpoint, deleteBreakpoint, listBreakpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary MCP tool handler for 'listWatchpoints'. Calls ViceClient.listWatchpoints(), handles empty list, formats output with hex addresses and metadata hints.
    async () => { const watchpoints = client.listWatchpoints(); if (watchpoints.length === 0) { return formatResponse({ count: 0, watchpoints: [], hint: "No watchpoints set. Use setWatchpoint() to add one.", }); } return formatResponse({ count: watchpoints.length, watchpoints: watchpoints.map((wp) => ({ id: wp.id, startAddress: { value: wp.startAddress, hex: `$${wp.startAddress.toString(16).padStart(4, "0")}`, }, endAddress: { value: wp.endAddress, hex: `$${wp.endAddress.toString(16).padStart(4, "0")}`, }, type: wp.type, enabled: wp.enabled, temporary: wp.temporary, })), hint: `${watchpoints.length} watchpoint(s) active. Use deleteBreakpoint(id) to remove (works for both breakpoints and watchpoints).`, }); }
  • src/index.ts:764-803 (registration)
    MCP server registration of the 'listWatchpoints' tool, including description and handler reference.
    server.registerTool( "listWatchpoints", { description: `List all active memory watchpoints. Shows watchpoint IDs, address ranges, type (load/store), and status. Related tools: setWatchpoint, deleteBreakpoint, listBreakpoints`, }, async () => { const watchpoints = client.listWatchpoints(); if (watchpoints.length === 0) { return formatResponse({ count: 0, watchpoints: [], hint: "No watchpoints set. Use setWatchpoint() to add one.", }); } return formatResponse({ count: watchpoints.length, watchpoints: watchpoints.map((wp) => ({ id: wp.id, startAddress: { value: wp.startAddress, hex: `$${wp.startAddress.toString(16).padStart(4, "0")}`, }, endAddress: { value: wp.endAddress, hex: `$${wp.endAddress.toString(16).padStart(4, "0")}`, }, type: wp.type, enabled: wp.enabled, temporary: wp.temporary, })), hint: `${watchpoints.length} watchpoint(s) active. Use deleteBreakpoint(id) to remove (works for both breakpoints and watchpoints).`, }); } );
  • Type definitions for CheckpointInfo (return type of listWatchpoints) and CheckpointType used throughout checkpoint/watchpoint operations.
    export type CheckpointType = "exec" | "load" | "store"; export interface CheckpointInfo { id: number; startAddress: number; endAddress: number; enabled: boolean; temporary: boolean; type: CheckpointType; }
  • ViceClient helper method implementing listWatchpoints by filtering non-execution checkpoints (watchpoints) from local checkpoints Map.
    listWatchpoints(): CheckpointInfo[] { return Array.from(this.checkpoints.values()).filter((cp) => cp.type !== "exec"); }

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/simen/vice-mcp'

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