get_codegen_session
Retrieve details about a specific code generation session using its session ID to access browser automation results and generated test code.
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:160-180 (handler)The core handler implementation for the 'get_codegen_session' tool. It retrieves the codegen session data using ActionRecorder.getInstance().getSession(sessionId) and returns it, or throws an error 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 }) => { const session = ActionRecorder.getInstance().getSession(sessionId); if (!session) { throw new Error(`Session ${sessionId} not found`); } return session; } };
- src/toolHandler.ts:364-373 (registration)Registration/dispatch logic in the main toolHandler where 'get_codegen_session' is handled by calling its handler via handleCodegenResult.switch (name) { case 'start_codegen_session': return await handleCodegenResult(startCodegenSession.handler(args)); case 'end_codegen_session': return await handleCodegenResult(endCodegenSession.handler(args)); case 'get_codegen_session': return await handleCodegenResult(getCodegenSession.handler(args)); case 'clear_codegen_session': return await handleCodegenResult(clearCodegenSession.handler(args)); }
- src/tools.ts:50-62 (schema)Input schema definition for 'get_codegen_session' tool provided to the MCP server via createToolDefinitions().{ 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:7-12 (registration)Import statement registering the getCodegenSession tool object into the main toolHandler.import { startCodegenSession, endCodegenSession, getCodegenSession, clearCodegenSession } from './tools/codegen/index.js';
- src/tools/codegen/index.ts:204-209 (helper)Export of codegenTools array including getCodegenSession for use in other modules.export const codegenTools = [ startCodegenSession, endCodegenSession, getCodegenSession, clearCodegenSession ];