get_codegen_session
Retrieve details about a browser automation code generation session to track progress and access generated scripts.
Instructions
Get information about a code generation session
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ID of the session to retrieve |
Implementation Reference
- src/tools/codegen/index.ts:175-195 (handler)The Tool object defining the get_codegen_session tool, including its handler function that fetches the session from ActionRecorder by ID and returns it or throws if not found.export const getCodegenSession: Tool = { name: "get_codegen_session", description: "Get information about a code generation session", parameters: { type: "object", properties: { sessionId: { type: "string", description: "ID of the session to retrieve", }, }, required: ["sessionId"], }, handler: async ({ sessionId }: { sessionId: string }, _context?: { server?: any }) => { const session = ActionRecorder.getInstance().getSession(sessionId); if (!session) { throw new Error(`Session ${sessionId} not found`); } return session; }, };
- src/tools.ts:50-63 (schema)The input schema definition for the get_codegen_session tool used in tool discovery/registration.{ name: "get_codegen_session", description: "Get information about a code generation session", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the session to retrieve", }, }, required: ["sessionId"], }, },
- src/toolHandler.ts:436-437 (registration)The dispatch/registration case in the main tool handler that calls the getCodegenSession.handler when the tool is invoked.case "get_codegen_session": return await handleCodegenResult(getCodegenSession.handler(args, { server }));
- src/toolHandler.ts:37-40 (registration)Import of the getCodegenSession tool from codegen/index.ts into the main toolHandler.clearCodegenSession, endCodegenSession, getCodegenSession, startCodegenSession,
- src/tools.ts:531-531 (registration)Listing of get_codegen_session in the CODEGEN_TOOLS array for tool categorization."get_codegen_session",