Skip to main content
Glama

think

Facilitate structured reasoning and step-by-step analysis during complex problem-solving. Append thoughts to logs for policy verification, decision-making chains, and enhanced sequential reasoning processes without altering external states.

Instructions

Use this tool to think about something. It will not obtain new information or change anything, but just append the thought to the log. Use it when complex reasoning or cache memory is needed, especially during long chains of tool calls, policy adherence scenarios, or sequential decision making.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thoughtYesA thought to think about. This can be structured reasoning, step-by-step analysis, policy verification, or any other mental process that helps with problem-solving.

Implementation Reference

  • The handler function for the "think" tool. It logs the input thought with a timestamp to the thoughtsLog array and returns a confirmation message in the MCP format.
    async ({ thought }) => { // Log the thought with a timestamp const timestamp = new Date().toISOString(); this.thoughtsLog.push({ timestamp, thought }); console.error(`[${timestamp}] Thought recorded: ${thought.substring(0, 50)}${thought.length > 50 ? '...' : ''}`); // Return a confirmation return { content: [{ type: "text", text: `Thought recorded: ${thought.length > 50 ? thought.substring(0, 50) + '...' : thought}` }] }; }
  • The input schema for the "think" tool, defining a single string parameter 'thought' using Zod validation.
    { thought: z.string().describe("A thought to think about. This can be structured reasoning, step-by-step analysis, policy verification, or any other mental process that helps with problem-solving.") },
  • src/index.ts:31-52 (registration)
    The registration of the "think" tool using the McpServer.tool() method, including name, description, schema, and handler function.
    "think", "Use this tool to think about something. It will not obtain new information or change anything, but just append the thought to the log. Use it when complex reasoning or cache memory is needed, especially during long chains of tool calls, policy adherence scenarios, or sequential decision making.", { thought: z.string().describe("A thought to think about. This can be structured reasoning, step-by-step analysis, policy verification, or any other mental process that helps with problem-solving.") }, async ({ thought }) => { // Log the thought with a timestamp const timestamp = new Date().toISOString(); this.thoughtsLog.push({ timestamp, thought }); console.error(`[${timestamp}] Thought recorded: ${thought.substring(0, 50)}${thought.length > 50 ? '...' : ''}`); // Return a confirmation return { content: [{ type: "text", text: `Thought recorded: ${thought.length > 50 ? thought.substring(0, 50) + '...' : thought}` }] }; } );

Other Tools

Related Tools

  • @abhinav-mangla/think-tool-mcp
  • @flight505/mcp-think-tank
  • @PhillipRt/think-mcp-server
  • @piotrpalek/mcp-thinking-tool
  • @hanzoai/mcp
  • @marcopesani/think-mcp-server

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