sessions_step_in
Step into the next function call during Python debugging to examine code execution in detail when a breakpoint is active.
Instructions
Step into the next function call (requires active breakpoint)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The debug session ID |
Implementation Reference
- src/mcp_debug_tool/server.py:555-610 (handler)The handler function for the 'sessions_step_in' tool. Extracts sessionId from arguments, calls session_manager.step_in_async(session_id), serializes the response to JSON, and handles various errors by returning appropriate JSON error messages.async def _handle_sessions_step_in(self, arguments: dict) -> list[TextContent]: """ Handler for sessions_step_in tool. Steps into the next function call. """ try: session_id = arguments.get("sessionId") if not session_id: return [ TextContent( type="text", text=json.dumps({ "error": { "type": "ValueError", "message": "sessionId is required", } }), ) ] response = await self.session_manager.step_in_async(session_id) result = response.model_dump() return [ TextContent( type="text", text=json.dumps(result), ) ] except KeyError as e: return [ TextContent( type="text", text=json.dumps({ "error": { "type": "SessionNotFound", "message": str(e), } }), ) ] except Exception as e: logger.exception("Error in step_in") return [ TextContent( type="text", text=json.dumps({ "error": { "type": type(e).__name__, "message": str(e), } }), ) ]
- src/mcp_debug_tool/server.py:162-175 (registration)Registration of the 'sessions_step_in' MCP tool, including name, description, and input schema requiring 'sessionId'.Tool( name="sessions_step_in", description="Step into the next function call (requires active breakpoint)", inputSchema={ "type": "object", "properties": { "sessionId": { "type": "string", "description": "The debug session ID", }, }, "required": ["sessionId"], }, ),
- src/mcp_debug_tool/server.py:165-174 (schema)Input schema for the 'sessions_step_in' tool, defining a required 'sessionId' string parameter.inputSchema={ "type": "object", "properties": { "sessionId": { "type": "string", "description": "The debug session ID", }, }, "required": ["sessionId"], },