Skip to main content
Glama

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
NameRequiredDescriptionDefault
sessionIdYesThe debug session ID

Implementation Reference

  • 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),
                        }
                    }),
                )
            ]
  • 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"],
        },
    ),
  • 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"],
    },

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