Skip to main content
Glama

get_thinking_summary

Retrieve a complete summary of the current thinking session, including all analysis steps and reasoning paths.

Instructions

Get a complete summary of the current thinking session with all steps and analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_thinking_summary' tool. It checks if there are thinking steps, generates a formatted summary of all steps including status, timestamps, reasoning, and categories, and returns it as text content. Handles empty session and errors.
      async () => {
        try {
          if (thinkingSession.currentSteps.length === 0) {
            return {
              content: [{
                type: "text",
                text: "πŸ“ **No Active Thinking Session**\n\nUse 'sequential_thinking' to start your first thought."
              }]
            };
          }
          
          const targetSteps = thinkingSession.metadata?.target_steps;
          const progress = targetSteps ? ` (${thinkingSession.currentSteps.length}/${targetSteps})` : '';
          
          let content = `πŸ“‹ **Thinking Session Summary${progress}**\n\n`;
          content += `**Status**: ${thinkingSession.isComplete ? 'Complete βœ…' : 'In Progress πŸ”„'}\n`;
          content += `**Total Steps**: ${thinkingSession.currentSteps.length}\n`;
          content += `**Started**: ${thinkingSession.currentSteps[0]?.timestamp ? new Date(thinkingSession.currentSteps[0].timestamp).toLocaleString() : 'Unknown'}\n\n`;
          
          content += "**Complete Thinking Chain:**\n";
          thinkingSession.currentSteps.forEach((step, index) => {
            const categoryLabel = step.category ? ` [${step.category}]` : '';
            content += `**${step.id}.${categoryLabel}** ${step.thought}\n`;
            if (step.reasoning) {
              content += `   *Reasoning: ${step.reasoning}*\n`;
            }
            content += '\n';
          });
          
          if (thinkingSession.summary) {
            content += `**Session Summary**: ${thinkingSession.summary}\n`;
          }
          
          if (thinkingSession.pdfContext) {
            content += `**PDF Context**: ${thinkingSession.pdfContext.filename || 'Document loaded'}\n`;
          }
          
          return {
            content: [{
              type: "text", 
              text: content
            }]
          };
          
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: `❌ **Error getting thinking summary**: ${error instanceof Error ? error.message : String(error)}`
            }]
          };
        }
      }
    );
  • MCP tool registration using server.tool(). Registers 'get_thinking_summary' with empty input schema {} and inline async handler function. No parameters required.
    server.tool(
      "get_thinking_summary",
      "Get a complete summary of the current thinking session with all steps and analysis",
      {},
      async () => {
        try {
          if (thinkingSession.currentSteps.length === 0) {
            return {
              content: [{
                type: "text",
                text: "πŸ“ **No Active Thinking Session**\n\nUse 'sequential_thinking' to start your first thought."
              }]
            };
          }
          
          const targetSteps = thinkingSession.metadata?.target_steps;
          const progress = targetSteps ? ` (${thinkingSession.currentSteps.length}/${targetSteps})` : '';
          
          let content = `πŸ“‹ **Thinking Session Summary${progress}**\n\n`;
          content += `**Status**: ${thinkingSession.isComplete ? 'Complete βœ…' : 'In Progress πŸ”„'}\n`;
          content += `**Total Steps**: ${thinkingSession.currentSteps.length}\n`;
          content += `**Started**: ${thinkingSession.currentSteps[0]?.timestamp ? new Date(thinkingSession.currentSteps[0].timestamp).toLocaleString() : 'Unknown'}\n\n`;
          
          content += "**Complete Thinking Chain:**\n";
          thinkingSession.currentSteps.forEach((step, index) => {
            const categoryLabel = step.category ? ` [${step.category}]` : '';
            content += `**${step.id}.${categoryLabel}** ${step.thought}\n`;
            if (step.reasoning) {
              content += `   *Reasoning: ${step.reasoning}*\n`;
            }
            content += '\n';
          });
          
          if (thinkingSession.summary) {
            content += `**Session Summary**: ${thinkingSession.summary}\n`;
          }
          
          if (thinkingSession.pdfContext) {
            content += `**PDF Context**: ${thinkingSession.pdfContext.filename || 'Document loaded'}\n`;
          }
          
          return {
            content: [{
              type: "text", 
              text: content
            }]
          };
          
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: `❌ **Error getting thinking summary**: ${error instanceof Error ? error.message : String(error)}`
            }]
          };
        }
      }
    );
  • Empty Zod schema indicating the tool takes no input parameters.
    {},
  • Global thinkingSession state object used by the tool to store and retrieve the list of thinking steps for summarization.
    let thinkingSession: ThinkingSession = {
      currentSteps: [],
      totalSteps: 0,
      isComplete: false
    };

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/multiluca2020/visum-thinker-mcp-server'

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