status
Check VICE emulator connection status and verify if emulation is running or paused before executing debugging commands.
Instructions
Get current VICE connection and emulation state.
Returns connection status, whether emulation is running or paused, and host/port if connected.
Use this to:
Check if you're connected before running other commands
See if emulation is running or stopped (e.g., at a breakpoint)
Verify connection details
Related tools: connect, disconnect
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:108-123 (handler)The handler function that executes the 'status' tool logic. Retrieves the VICE client state and formats a response with connection status, running state, host/port if connected, and contextual hints.async () => { const state = client.getState(); return formatResponse({ connected: state.connected, running: state.running, ...(state.connected && { host: state.host, port: state.port, }), hint: state.connected ? state.running ? "VICE is running. Use setBreakpoint() + continue() to pause at a specific point, or step() to execute one instruction." : "VICE is paused. Use continue() to resume or step() to execute one instruction." : "Not connected. Use connect() to establish connection to VICE.", }); }
- src/index.ts:94-124 (registration)The registration of the 'status' tool with the MCP server, including name, description, and reference to the inline handler function. No input schema defined as the tool takes no parameters.server.registerTool( "status", { description: `Get current VICE connection and emulation state. Returns connection status, whether emulation is running or paused, and host/port if connected. Use this to: - Check if you're connected before running other commands - See if emulation is running or stopped (e.g., at a breakpoint) - Verify connection details Related tools: connect, disconnect`, }, async () => { const state = client.getState(); return formatResponse({ connected: state.connected, running: state.running, ...(state.connected && { host: state.host, port: state.port, }), hint: state.connected ? state.running ? "VICE is running. Use setBreakpoint() + continue() to pause at a specific point, or step() to execute one instruction." : "VICE is paused. Use continue() to resume or step() to execute one instruction." : "Not connected. Use connect() to establish connection to VICE.", }); } );
- src/protocol/client.ts:74-76 (helper)The ViceClient.getState() method, which provides the connection and emulation state (connected, running, host, port) used directly by the status tool handler.getState(): ConnectionState { return { ...this.state }; }
- src/index.ts:38-59 (helper)The formatResponse helper function used by the status handler (and other tools) to wrap the response data with _meta state information in a standardized MCP content format.function formatResponse(data: object) { const state = client.getState(); return { content: [ { type: "text" as const, text: JSON.stringify( { ...data, _meta: { connected: state.connected, running: state.running, ...(state.connected && { host: state.host, port: state.port }), }, }, null, 2 ), }, ], }; }