reset_session
Clear all session state to start fresh when switching Figma files, re-exploring from scratch, or resolving corrupted sessions.
Instructions
Clear all session state for fresh start.
USE WHEN:
Switching to different Figma file
Want to re-explore from scratch
Session state seems corrupted
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers/session.js:30-43 (handler)The main handler function for the reset_session tool. It resets the session state using session.reset() and returns a structured confirmation response.export function resetSession(ctx) { const { session, chunker } = ctx; session.reset(); const response = chunker.wrapResponse( { message: "Session state cleared" }, { step: "Session reset", progress: "Complete", nextStep: "Start fresh with list_pages(file_key)", } ); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; }
- src/tools/schemas.js:251-263 (schema)The JSON schema definition for the reset_session tool, specifying its name, description, and empty input schema (no parameters required).{ name: "reset_session", description: `Clear all session state for fresh start. USE WHEN: - Switching to different Figma file - Want to re-explore from scratch - Session state seems corrupted`, inputSchema: { type: "object", properties: {}, }, },
- src/tools/handlers/index.js:7-7 (registration)Export of the resetSession handler function, making it available for import in other modules.export { repeatLast, getSessionState, resetSession } from "./session.js";
- src/index.js:101-103 (registration)Registration of the reset_session tool in the main MCP server switch statement, dispatching calls to the handler.case "reset_session": result = handlers.resetSession(this.ctx); break;