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
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | No | Optional session ID (defaults to current session) |
Input Schema (JSON Schema)
{
"properties": {
"sessionId": {
"description": "Optional session ID (defaults to current session)",
"type": "string"
}
},
"type": "object"
}
Implementation Reference
- src/tools/handlers.ts:104-120 (handler)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), }, ], }; }
- src/tools/definitions.ts:97-109 (schema)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)', }, }, }, };
- src/lib.ts:190-211 (helper)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, }; }