get_thoughts
Retrieve all recorded thoughts from the Local Utilities MCP Server, providing quick access to stored mental notes for efficient review and organization.
Instructions
Retrieve all recorded thoughts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/think.ts:88-96 (handler)The asynchronous handler function for the 'get_thoughts' tool. It copies the current thoughts array from closure state and returns it as a JSON string in a text content block, as per MCP protocol.async () => { const currentThoughts = [...thoughts]; return { content: [{ type: "text", text: JSON.stringify(currentThoughts, null, 2) }] }; }
- src/mcp/think.ts:85-97 (registration)Registers the 'get_thoughts' tool on the MCP server using server.tool(). Provides a description and the inline handler function. No input parameters/schema specified.server.tool( "get_thoughts", "Retrieve all recorded thoughts", async () => { const currentThoughts = [...thoughts]; return { content: [{ type: "text", text: JSON.stringify(currentThoughts, null, 2) }] }; } );
- src/mcp/think.ts:5-8 (schema)Defines the TypeScript interface for a 'Thought' object, which structures the data stored and returned by the get_thoughts tool.export interface Thought { timestamp: string; content: string; }
- src/mcp/think.ts:64-64 (helper)Closure variable 'thoughts' that maintains the array of recorded thoughts in memory, shared across tool invocations including get_thoughts.let thoughts: Thought[] = [];