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",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying it's likely read-only, but doesn't confirm safety aspects like whether it requires authentication, has rate limits, or what happens if the session doesn't exist. This leaves significant gaps for a tool that presumably retrieves session data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what information is returned (e.g., session status, metadata, or code), behavioral traits like error handling, or how it relates to sibling tools. For a retrieval tool in a codegen context, this leaves the agent with insufficient context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'sessionId' clearly documented. The description doesn't add any additional meaning beyond what the schema provides, such as format examples or context about valid session IDs, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('information about a code generation session'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'clear_codegen_session' or 'end_codegen_session', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'start_codegen_session' or other codegen-related siblings. It lacks context about prerequisites or typical use cases, leaving the agent with minimal direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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