Skip to main content
Glama
simen

VICE C64 Emulator MCP Server

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");
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It describes what the tool returns (watchpoint details) but does not disclose behavioral traits such as permissions needed, rate limits, or whether it's a read-only operation. The description is informative but lacks critical operational context for a tool in a debugging environment.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by details and related tools. Every sentence adds value without waste, making it efficient and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and low complexity (0 parameters), the description is adequate but incomplete. It explains what the tool does but lacks context on behavior, output format, or integration with sibling tools, which is important in a debugging toolset. It meets minimum viability but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not add parameter information, which is appropriate, but it could have mentioned if there are any implicit parameters or constraints (e.g., session state). Baseline is 4 due to zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('List all active memory watchpoints') and resource ('memory watchpoints'), distinguishing it from sibling tools like listBreakpoints by specifying the type of breakpoint. It provides exact details about what information is shown (IDs, address ranges, type, status).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes 'Related tools: setWatchpoint, deleteBreakpoint, listBreakpoints', which implies usage context by naming alternatives. However, it does not explicitly state when to use this tool versus those alternatives (e.g., for watchpoints vs. breakpoints), so it lacks explicit exclusions or detailed guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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