Skip to main content
Glama

get_thinking_summary

Generate a comprehensive summary of the entire thinking process to document and review structured idea exploration.

Instructions

Generate a comprehensive summary of the entire thinking process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that implements the get_thinking_summary tool logic by generating a comprehensive JSON summary of the thought history, including counts by stage, average scores, branches, revisions, and a timeline.
    generateSummary(): string {
      if (!this.thoughtHistory.length) {
        return JSON.stringify({ summary: "No thoughts recorded yet" });
      }
      
      const stages: Record<string, ThoughtData[]> = {};
      for (const thought of this.thoughtHistory) {
        const stageName = thought.stage;
        if (!stages[stageName]) {
          stages[stageName] = [];
        }
        stages[stageName].push(thought);
      }
      
      // Calculate various metrics
      const summary = {
        totalThoughts: this.thoughtHistory.length,
        stages: Object.entries(stages).reduce((acc, [stage, thoughts]) => {
          acc[stage] = {
            count: thoughts.length,
            averageScore: thoughts.reduce((sum, t) => sum + (t.score || 0), 0) / thoughts.length
          };
          return acc;
        }, {} as Record<string, { count: number, averageScore: number }>),
        branches: Object.entries(this.branches).reduce((acc, [branchId, thoughts]) => {
          acc[branchId] = thoughts.length;
          return acc;
        }, {} as Record<string, number>),
        revisions: this.thoughtHistory.filter(t => t.isRevision).length,
        timeline: this.thoughtHistory.map(t => ({
          number: t.thoughtNumber,
          stage: t.stage,
          score: t.score,
          branch: t.branchId
        }))
      };
      
      return JSON.stringify({ summary }, null, 2);
    }
  • MCP CallToolRequestSchema switch case handler that executes the get_thinking_summary tool by calling the thinking server's generateSummary method and returning the result as text content.
    case "get_thinking_summary": {
      return {
        content: [{
          type: "text",
          text: thinkingServer.generateSummary()
        }]
      };
    }
  • Schema definition for the get_thinking_summary tool, using an empty Zod schema since it requires no input parameters.
    export const emptySchema = z.object({});
    
    export const getThinkingSummaryTool: Tool = {
      name: "get_thinking_summary",
      description: "Generate a comprehensive summary of the entire thinking process.",
      parameters: emptySchema,
      inputSchema: zodToInputSchema(emptySchema)
    };
  • src/tools.ts:83-89 (registration)
    Registration of the get_thinking_summary tool in the exported toolDefinitions array, which is used by the ListTools handler.
    export const toolDefinitions = [
      captureThoughtTool,
      reviseThoughtTool,
      retrieveRelevantThoughtsTool,
      getThinkingSummaryTool,
      clearThinkingHistoryTool
    ];
  • index.ts:33-36 (registration)
    MCP ListTools request handler that registers all tools, including get_thinking_summary, by returning the toolDefinitions array.
      return {
        tools: toolDefinitions
      };
    });

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/Promptly-Technologies-LLC/mcp-structured-thinking'

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