{"at":"2026-11-23T01:45:02.516Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T01:45:02.947Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T01:45:03.047Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T01:45:03.463Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"mcp-interactive-terminal","version":"1.0.0"}}}}
{"at":"2026-11-23T01:45:03.463Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T01:45:03.463Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T01:45:03.466Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Create Session"},"description":"Spawn an interactive terminal session (REPL, shell, database client, SSH, etc.). Returns a session_id for subsequent commands.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"args":{"description":"Arguments to pass to the command","items":{"type":"string"},"type":"array"},"cols":{"default":120,"description":"Terminal width in columns","maximum":300,"minimum":40,"type":"number"},"command":{"description":"The command to spawn (e.g., 'python3', 'bash', 'psql')","type":"string"},"cwd":{"description":"Working directory for the session","type":"string"},"env":{"additionalProperties":{"type":"string"},"description":"Additional environment variables","type":"object"},"name":{"description":"Human-readable session name","type":"string"},"rows":{"default":40,"description":"Terminal height in rows","maximum":100,"minimum":10,"type":"number"}},"required":["command"],"type":"object"},"name":"create_session"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Send Command"},"description":"Send a command/input to an interactive session and wait for output. Appends newline automatically. Returns clean text output (no ANSI codes). If a dangerous command is detected, you must use confirm_dangerous_command first.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"input":{"description":"The command/input to send (newline appended automatically)","type":"string"},"max_output_chars":{"description":"Override max output characters for this call","minimum":100,"type":"number"},"session_id":{"description":"The session ID to send input to","type":"string"},"timeout_ms":{"default":5000,"description":"Max time to wait for output (ms)","maximum":60000,"minimum":100,"type":"number"}},"required":["session_id","input"],"type":"object"},"name":"send_command"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Read Output"},"description":"Read the current terminal screen without sending any input. Safe read-only operation.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"full_screen":{"default":false,"description":"Read full scrollback history instead of just the visible screen","type":"boolean"},"session_id":{"description":"The session ID to read output from","type":"string"}},"required":["session_id"],"type":"object"},"name":"read_output"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List Sessions"},"description":"List all active interactive terminal sessions. Safe read-only operation.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"list_sessions"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Close Session"},"description":"Close/kill an interactive terminal session.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"session_id":{"description":"The session ID to close","type":"string"},"signal":{"default":"SIGTERM","description":"Signal to send (e.g., SIGTERM, SIGKILL)","type":"string"}},"required":["session_id"],"type":"object"},"name":"close_session"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Send Control"},"description":"Send a control character or special key to a session (e.g., ctrl+c to interrupt, ctrl+d to send EOF, arrow keys, tab for completion).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"control":{"description":"Control sequence to send. Supported: ctrl+a, ctrl+b, ctrl+c, ctrl+d, ctrl+e, ctrl+f, ctrl+k, ctrl+l, ctrl+n, ctrl+p, ctrl+r, ctrl+u, ctrl+w, ctrl+z, ctrl+\\, ctrl+], enter, tab, escape, up, down, right, left, home, end, backspace, delete","type":"string"},"session_id":{"description":"The session ID","type":"string"}},"required":["session_id","control"],"type":"object"},"name":"send_control"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Confirm Dangerous Command"},"description":"Execute a command that was flagged as dangerous by send_command. Requires a justification explaining WHY the command is necessary. This is a separate confirmation step for safety.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"input":{"description":"The exact dangerous command to confirm and execute","type":"string"},"justification":{"description":"Explanation of WHY this dangerous command is necessary (min 10 chars)","minLength":10,"type":"string"},"session_id":{"description":"The session ID","type":"string"}},"required":["session_id","input","justification"],"type":"object"},"name":"confirm_dangerous_command"}]}}}
