Skip to main content
Glama

clear_codegen_session

Clears a code generation session in the Playwright MCP Server by removing the session data, ensuring a fresh start without generating test output.

Instructions

Clear a code generation session without generating a test

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesID of the session to clear

Implementation Reference

  • The clearCodegenSession tool object defining the handler function that executes the tool logic by clearing the specified codegen session using ActionRecorder.clearSession().
    export const clearCodegenSession: Tool = { name: "clear_codegen_session", description: "Clear a code generation session", parameters: { type: "object", properties: { sessionId: { type: "string", description: "ID of the session to clear", }, }, required: ["sessionId"], }, handler: async ({ sessionId }: { sessionId: string }) => { const success = ActionRecorder.getInstance().clearSession(sessionId); if (!success) { throw new Error(`Session ${sessionId} not found`); } return { success }; }, };
  • MCP input schema definition for the clear_codegen_session tool, used for tool discovery and validation.
    name: "clear_codegen_session", description: "Clear a code generation session without generating a test", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the session to clear" } }, required: ["sessionId"] } },
  • Registration and dispatch of the clear_codegen_session tool in the main handleToolCall switch statement, routing to the specific handler.
    case "clear_codegen_session": return await handleCodegenResult(clearCodegenSession.handler(args));
  • Inclusion of clearCodegenSession in the codegenTools export array for grouping codegen-related tools.
    clearCodegenSession,
  • src/tools.ts:441-441 (registration)
    Listing of clear_codegen_session in the CODEGEN_TOOLS constant array.
    'clear_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/pvinis/mcp-playwright-stealth'

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