Skip to main content
Glama

sessions_step_over

Step over the current line during Python debugging to execute code without entering function calls, using the Debug Adapter Protocol to control execution flow.

Instructions

Step over the current line (requires active breakpoint)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesThe debug session ID

Implementation Reference

  • The primary handler function for the 'sessions_step_over' MCP tool. It validates the sessionId from arguments, calls SessionManager.step_over_async, serializes the response, and handles errors appropriately.
    async def _handle_sessions_step_over(self, arguments: dict) -> list[TextContent]: """ Handler for sessions_step_over tool. Steps over the current line. """ 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_over_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_over") return [ TextContent( type="text", text=json.dumps({ "error": { "type": type(e).__name__, "message": str(e), } }), ) ]
  • Registration of the 'sessions_step_over' tool in the list_tools() function, including name, description, and input schema requiring 'sessionId'.
    Tool( name="sessions_step_over", description="Step over the current line (requires active breakpoint)", inputSchema={ "type": "object", "properties": { "sessionId": { "type": "string", "description": "The debug session ID", }, }, "required": ["sessionId"], }, ),
  • Input schema definition for the 'sessions_step_over' tool, specifying required 'sessionId' parameter.
    Tool( name="sessions_step_over", description="Step over the current line (requires active breakpoint)", inputSchema={ "type": "object", "properties": { "sessionId": { "type": "string", "description": "The debug session ID", }, }, "required": ["sessionId"], }, ),
  • Async wrapper in SessionManager that delegates to synchronous step_over method.
    async def step_over_async(self, session_id: str) -> BreakpointResponse: """ Async wrapper for step_over. Runs the synchronous step_over in a thread pool to avoid blocking. """ return await asyncio.to_thread(self.step_over, session_id)

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/Kaina3/Debug-MCP'

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