Skip to main content
Glama

get_codegen_session

Retrieve detailed information about a code generation session by providing its session ID using the Playwright-powered MCP server for browser automation.

Instructions

Get information about a code generation session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesID of the session to retrieve

Implementation Reference

  • The core handler function for the 'get_codegen_session' tool. It retrieves the code generation 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;
      }
    };
  • The dispatch registration in the main tool handler switch statement that calls the getCodegenSession.handler with input arguments.
    case 'get_codegen_session':
      return await handleCodegenResult(getCodegenSession.handler(args));
  • MCP tool definition including the input schema for 'get_codegen_session' used in 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"]
      }
    },
  • Includes getCodegenSession in the exported codegenTools array.
    export const codegenTools = [
      startCodegenSession,
      endCodegenSession,
      getCodegenSession,
      clearCodegenSession
    ]; 
  • src/tools.ts:488-488 (registration)
    Lists 'get_codegen_session' in the CODEGEN_TOOLS constant array.
    'get_codegen_session',

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/executeautomation/mcp-playwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server