Skip to main content
Glama
fmangot

Sequential Thinking MVP Server

by fmangot

get_session_summary

Retrieve a summary of structured thinking sessions to review step-by-step reasoning processes and alternative paths explored during complex problem-solving.

Instructions

Gets a summary of the current or specified thinking session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdNoOptional session ID (defaults to current session)

Implementation Reference

  • MCP tool handler for 'get_session_summary' that extracts optional sessionId from args, calls thinkingManager.getSessionSummary, and returns JSON-formatted summary or throws if session not found.
    case 'get_session_summary': {
      const { sessionId } = args as { sessionId?: string };
      const summary = thinkingManager.getSessionSummary(sessionId);
    
      if (!summary) {
        throw new Error('Session not found');
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(summary, null, 2),
          },
        ],
      };
    }
  • Tool schema definition for 'get_session_summary' including name, description, and inputSchema allowing optional sessionId.
    export const GET_SESSION_SUMMARY_TOOL: Tool = {
      name: 'get_session_summary',
      description: 'Gets a summary of the current or specified thinking session',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: {
            type: 'string',
            description: 'Optional session ID (defaults to current session)',
          },
        },
      },
    };
  • Core helper method in SequentialThinkingManager that computes and returns session summary statistics (thoughtCount, branchCount, timestamps) for given or current sessionId.
    public getSessionSummary(sessionId?: string): {
      sessionId: string;
      thoughtCount: number;
      branchCount: number;
      createdAt: number;
      updatedAt: number;
    } | null {
      const sid = sessionId || this.currentSessionId;
      const session = this.sessions.get(sid);
    
      if (!session) {
        return null;
      }
    
      return {
        sessionId: session.sessionId,
        thoughtCount: session.thoughts.length,
        branchCount: session.branches.size,
        createdAt: session.createdAt,
        updatedAt: session.updatedAt,
      };
    }

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/fmangot/Mcp'

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