Skip to main content
Glama

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
NameRequiredDescriptionDefault
sessionIdYesID of the session to retrieve

Implementation Reference

  • 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;
      },
    };
  • 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"],
      },
    },
  • 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 }));
  • 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",

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

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