think
Append structured thoughts to a log for complex reasoning or cache memory needs without altering the database, enhancing multi-step problem-solving efficiency.
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/server.ts:17-23 (handler)The execute handler for the "think" tool. It logs the provided thought to the server log and returns the thought unchanged.execute: async (args, { log }) => { // Log the thought (this will be visible in the server logs but not to the user) log.info("Thinking process", { thought: args.thought }); // Simply return the thought itself, as per Anthropic's blog post return args.thought; },
- src/server.ts:14-16 (schema)Zod schema defining the input parameters for the "think" tool: a single 'thought' string.parameters: z.object({ thought: z.string().describe("A thought to think about.") }),
- src/server.ts:11-24 (registration)Registration of the "think" tool on the MCP server using server.addTool, including name, description, schema, and handler.server.addTool({ name: "think", description: "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.", parameters: z.object({ thought: z.string().describe("A thought to think about.") }), execute: async (args, { log }) => { // Log the thought (this will be visible in the server logs but not to the user) log.info("Thinking process", { thought: args.thought }); // Simply return the thought itself, as per Anthropic's blog post return args.thought; }, });