stepout
Exit the current function during Go program debugging using Delve MCP, enabling developers to trace and analyze code execution more effectively. Requires a valid debug session ID.
Instructions
Step out of current function
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ID of the debug session |
Implementation Reference
- src/handlers/control.ts:82-90 (handler)Handler implementation for the 'stepout' tool, which sends a 'stepout' command to the Delve debug session and returns a confirmation message.case "stepout": { await sendDelveCommand(session, "Command", { name: "stepout" }); return { content: [{ type: "text", text: "Stepped out of function" }] }; }
- src/server.ts:223-236 (registration)Registration of the 'stepout' tool in the MCP server's ListToolsRequestHandler, including its description and input schema.{ name: "stepout", description: "Step out of current function", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the debug session" } }, required: ["sessionId"] } },
- src/server.ts:411-413 (registration)Dispatch logic in the CallToolRequestHandler that routes the 'stepout' tool call to the handleControlCommands function.if (["setBreakpoint", "removeBreakpoint", "continue", "next", "step", "stepout", "variables", "evaluate"].includes(name)) { return handleControlCommands(name, args); }