Skip to main content
Glama

get_codegen_session

Retrieve details of a specific code generation session by its ID, enabling efficient tracking and management of browser automation tasks within the Playwright MCP Server.

Instructions

Get information about a code generation session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesID of the session to retrieve

Implementation Reference

  • Full tool definition including the handler function that retrieves and returns the codegen session data by sessionId using ActionRecorder.
    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;
      }
    };
  • Registration and dispatch logic in the main tool handler that calls the getCodegenSession.handler for 'get_codegen_session' tool calls.
    switch (name) {
      case 'start_codegen_session':
        return await handleCodegenResult(startCodegenSession.handler(args));
      case 'end_codegen_session':
        return await handleCodegenResult(endCodegenSession.handler(args));
      case 'get_codegen_session':
        return await handleCodegenResult(getCodegenSession.handler(args));
      case 'clear_codegen_session':
        return await handleCodegenResult(clearCodegenSession.handler(args));
    }
  • MCP SDK tool definition with input schema for validating get_codegen_session parameters.
    {
      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"]
      }
    },
  • Import statement that brings the getCodegenSession tool into the main tool handler.
      startCodegenSession,
      endCodegenSession,
      getCodegenSession,
      clearCodegenSession
    } from './tools/codegen/index.js';
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns structured data, or handles errors. The description is minimal and lacks critical behavioral details for a tool with no annotation coverage.

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

Conciseness4/5

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

The description is a single, efficient sentence ('Get information about a code generation session') that is front-loaded and wastes no words. It could be slightly more informative but earns high marks for brevity and clarity within its limited scope.

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 tool's complexity (retrieving session information), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what information is returned, potential errors, or how it integrates with siblings like 'start_codegen_session'. For a tool with no structured behavioral data, more context is needed to guide effective use.

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 parameter 'sessionId' documented as 'ID of the session to retrieve'. The description adds no additional meaning beyond this, such as format examples or sourcing instructions. With high schema coverage, the baseline score of 3 is appropriate, as the schema handles the parameter documentation adequately.

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 states the tool's purpose ('Get information about a code generation session'), which is clear but vague. It specifies the verb 'Get' and resource 'code generation session', but doesn't differentiate from siblings like 'start_codegen_session' or 'end_codegen_session' beyond the action. The purpose is understandable but lacks specificity about what information is retrieved.

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. It doesn't mention prerequisites (e.g., needing a session ID from 'start_codegen_session'), exclusions, or comparisons to siblings like 'clear_codegen_session'. Usage is implied by the name but not explicitly stated, leaving gaps for an AI agent to infer context.

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/BhanuTJ93/MCP'

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