Skip to main content
Glama

think

Pause and append thoughts to a log for complex reasoning tasks without altering the database. Use this tool to enhance performance by enabling additional thinking steps during response generation.

Instructions

Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thoughtYesA thought to think about.

Implementation Reference

  • The handler function for the 'think' tool. It generates a random encouragement message based on predefined options and returns it as a text content block.
    async () => { const encouragements = [ "Great thinking.", "Excellent reflection.", "Insightful thinking process.", ]; const randomEncouragement = encouragements[Math.floor(Math.random() * encouragements.length)]; return { content: [{ type: "text", text: randomEncouragement }], }; }
  • Input schema definition for the 'think' tool using Zod, specifying a required 'thought' string parameter.
    { thought: z.string().describe("A thought to think about."), },
  • src/index.ts:12-32 (registration)
    Registration of the 'think' tool on the MCP server, including name, description, input schema, and handler function.
    server.tool( "think", "Use the tool to think about something. It will not obtain new information or change the database, " + "but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.", { thought: z.string().describe("A thought to think about."), }, async () => { const encouragements = [ "Great thinking.", "Excellent reflection.", "Insightful thinking process.", ]; const randomEncouragement = encouragements[Math.floor(Math.random() * encouragements.length)]; return { content: [{ type: "text", text: randomEncouragement }], }; } );

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/marcopesani/think-mcp-server'

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