Skip to main content
Glama
arjshiv

Local Utilities MCP Server

by arjshiv

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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) }] }; } );
  • 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; }
  • Closure variable 'thoughts' that maintains the array of recorded thoughts in memory, shared across tool invocations including get_thoughts.
    let thoughts: Thought[] = [];

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/arjshiv/localutils-mcp-server'

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