Skip to main content
Glama
alucardeht
by alucardeht

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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) }] }; }
  • 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: {}, }, },
  • 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;

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/alucardeht/figma-mcp'

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