Skip to main content
Glama
alucardeht
by alucardeht

get_session_state

Retrieve current debugging session state including active file, sent pages and frames, pending operations, and last update timestamp for Figma file interactions.

Instructions

Get current session state for debugging.

RETURNS:

  • Current file being explored

  • Pages and frames already sent

  • Pending continuation operations

  • Last update timestamp

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that retrieves the current session state using session.getState(), wraps it with chunker.wrapResponse, and returns it as a formatted text content block.
    export function getSessionState(ctx) { const { session, chunker } = ctx; const state = session.getState(); const response = chunker.wrapResponse(state, { step: "Session state retrieved", progress: state.currentFile ? "Active session" : "No active session", nextStep: "Use reset_session to clear state if needed", }); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; }
  • The JSON schema definition for the get_session_state tool, including name, description, and empty input schema (no parameters required).
    { name: "get_session_state", description: `Get current session state for debugging. RETURNS: - Current file being explored - Pages and frames already sent - Pending continuation operations - Last update timestamp`, inputSchema: { type: "object", properties: {}, }, },
  • src/index.js:98-100 (registration)
    Registration in the MCP server's CallToolRequestSchema handler switch statement, dispatching the tool call to handlers.getSessionState.
    case "get_session_state": result = handlers.getSessionState(this.ctx); break;
  • Re-export of the getSessionState handler from session.js, making it available via the handlers module.
    export { repeatLast, getSessionState, resetSession } from "./session.js";

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