Skip to main content
Glama
simen
by simen

toggleBreakpoint

Temporarily enable or disable a breakpoint in the VICE C64 Emulator while preserving its configuration for debugging 6502 assembly programs.

Instructions

Enable or disable a breakpoint without deleting it.

Use this to temporarily disable breakpoints while keeping their configuration.

Related tools: setBreakpoint, deleteBreakpoint, listBreakpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
breakpointIdYesBreakpoint ID from setBreakpoint
enabledYesTrue to enable, false to disable

Implementation Reference

  • src/index.ts:662-687 (registration)
    Registration of the toggleBreakpoint MCP tool, including schema and inline handler function.
    "toggleBreakpoint", { description: `Enable or disable a breakpoint without deleting it. Use this to temporarily disable breakpoints while keeping their configuration. Related tools: setBreakpoint, deleteBreakpoint, listBreakpoints`, inputSchema: z.object({ breakpointId: z.number().describe("Breakpoint ID from setBreakpoint"), enabled: z.boolean().describe("True to enable, false to disable"), }), }, async (args) => { try { await client.toggleCheckpoint(args.breakpointId, args.enabled); return formatResponse({ success: true, breakpointId: args.breakpointId, enabled: args.enabled, message: `Breakpoint ${args.breakpointId} ${args.enabled ? "enabled" : "disabled"}`, }); } catch (error) { return formatError(error as ViceError); } } );
  • MCP tool handler: calls ViceClient.toggleCheckpoint and formats success/error response using helpers.
    async (args) => { try { await client.toggleCheckpoint(args.breakpointId, args.enabled); return formatResponse({ success: true, breakpointId: args.breakpointId, enabled: args.enabled, message: `Breakpoint ${args.breakpointId} ${args.enabled ? "enabled" : "disabled"}`, }); } catch (error) { return formatError(error as ViceError); } }
  • Zod input schema validating breakpointId (number) and enabled (boolean).
    inputSchema: z.object({ breakpointId: z.number().describe("Breakpoint ID from setBreakpoint"), enabled: z.boolean().describe("True to enable, false to disable"), }),
  • ViceClient method implementing toggleCheckpoint: sends VICE CheckpointToggle command (0x15) and updates local checkpoint tracking.
    async toggleCheckpoint(checkpointId: number, enabled: boolean): Promise<void> { const body = Buffer.alloc(5); body.writeUInt32LE(checkpointId, 0); body[4] = enabled ? 1 : 0; await this.sendCommand(Command.CheckpointToggle, body); // Update local tracking const cp = this.checkpoints.get(checkpointId); if (cp) { cp.enabled = enabled; } }

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