think
Append thoughts to a reasoning log for complex problem-solving, enabling structured thinking without external data retrieval or system modifications.
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
| Name | Required | Description | Default |
|---|---|---|---|
| thought | Yes | A thought to think about. |
Implementation Reference
- src/index.ts:19-31 (handler)The handler function for the "think" tool. It generates a random encouragement message and returns it as a text content response.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 }], }; }
- src/index.ts:16-18 (schema)Input schema for the "think" tool, defining a single 'thought' parameter as a string using Zod.{ 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 }], }; } );