get_codegen_session
Retrieve details of a specific code generation session by providing its session ID, enabling tracking and management of automated test code creation within the Playwright MCP Server environment.
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:163-183 (handler)The core handler implementation for the 'get_codegen_session' tool. It retrieves the codegen session by ID from the ActionRecorder instance 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:336-337 (registration)Registration and dispatch logic in the main tool handler switch statement, which calls the getCodegenSession.handler function.case "get_codegen_session": return await handleCodegenResult(getCodegenSession.handler(args));
- src/tools.ts:50-62 (schema)Input schema definition for the 'get_codegen_session' tool used in MCP tool definitions.{ 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/tools.ts:438-441 (registration)The tool is listed in the CODEGEN_TOOLS array for categorization and conditional handling.'start_codegen_session', 'end_codegen_session', 'get_codegen_session', 'clear_codegen_session'