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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_thoughts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:58-72 (handler)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") }] }; } ); - src/index.ts:8-11 (helper)Interface defining the structure of each thought record stored in thoughtsLog, used by the get_thoughts handler.
interface ThoughtRecord { timestamp: string; thought: string; } - src/index.ts:14-14 (helper)Private array storing all ThoughtRecord entries, which the get_thoughts handler reads from.
private thoughtsLog: ThoughtRecord[] = [];