Skip to main content
Glama

get_thoughts

Retrieve all recorded thoughts from the current session to review and refine your reasoning process, enhancing structured problem-solving and decision-making clarity.

Instructions

Retrieve all thoughts recorded in the current session to review your reasoning process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for 'get_thoughts' tool: checks if thoughtsLog is empty, if so returns a message; otherwise formats all thoughts with timestamps and indices into a text response.
    async () => { if (this.thoughtsLog.length === 0) { return { content: [{ type: "text", text: "No thoughts have been recorded yet." }] }; } const formattedThoughts = this.thoughtsLog.map((entry, index) => `Thought #${index + 1} (${entry.timestamp}):\n${entry.thought}\n` ); return { content: [{ type: "text", text: formattedThoughts.join("\n") }] }; }
  • src/index.ts:54-73 (registration)
    Registration of the 'get_thoughts' tool via this.server.tool(), including name, description (no input schema), and inline handler function.
    // Register the get_thoughts tool this.server.tool( "get_thoughts", "Retrieve all thoughts recorded in the current session to review your reasoning process.", async () => { if (this.thoughtsLog.length === 0) { return { content: [{ type: "text", text: "No thoughts have been recorded yet." }] }; } const formattedThoughts = this.thoughtsLog.map((entry, index) => `Thought #${index + 1} (${entry.timestamp}):\n${entry.thought}\n` ); return { content: [{ type: "text", text: formattedThoughts.join("\n") }] }; } );
  • Interface defining the structure of each thought record stored in thoughtsLog, used by the get_thoughts handler.
    interface ThoughtRecord { timestamp: string; thought: string; }
  • Private array storing all ThoughtRecord entries, which the get_thoughts handler reads from.
    private thoughtsLog: ThoughtRecord[] = [];

Other Tools

Related Tools

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/cgize/claude-mcp-think-tool'

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