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

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get information' suggests a read-only operation, it doesn't specify what information is returned (status, code, metadata), whether there are authentication requirements, rate limits, or error conditions. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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 for a simple retrieval tool and front-loads the essential information. Every word earns its place in this concise formulation.

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 that this is a read operation with no annotations and no output schema, the description is incomplete. It doesn't explain what information is returned about sessions, what format the response takes, or what constitutes a valid session. For a tool that presumably returns structured data about code generation sessions, the description should provide more context about the return values and session lifecycle.

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 a clear parameter description for 'sessionId'. The tool description doesn't add any parameter information beyond what's in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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

Purpose3/5

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

The description 'Get information about a code generation session' clearly states the verb ('Get') and resource ('code generation session'), making the purpose understandable. However, it doesn't distinguish this tool from its sibling 'start_codegen_session' or 'end_codegen_session' - it's unclear if this retrieves active sessions, completed sessions, or all sessions. The purpose is clear but lacks sibling differentiation.

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. There's no mention of prerequisites (e.g., needing a session ID from 'start_codegen_session'), no indication of when this should be used instead of other session-related tools, and no context about what constitutes a valid session. The agent must infer usage from the tool name alone.

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

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

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