create_thinking_chain
Generate structured reasoning chains to break down complex topics into sequential thinking steps for clearer problem-solving and analysis.
Instructions
thinking process|chain of thought|reasoning chain|thought flow|sequential thinking - Create sequential thinking chain
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Topic to think about | |
| steps | No | Number of thinking steps |
Implementation Reference
- The core handler function that implements the create_thinking_chain tool logic, generating a structured thinking chain with steps, titles, content, and questions based on the provided topic and optional number of steps.export async function createThinkingChain(args: { topic: string; steps?: number }): Promise<ToolResult> { const { topic, steps = 5 } = args; const thinkingChain = { action: 'create_thinking_chain', topic, steps, chain: Array.from({ length: steps }, (_, i) => ({ step: i + 1, title: `Step ${i + 1}: Analyze ${topic}`, content: `Think about ${topic} from perspective ${i + 1}`, questions: [ `What are the key aspects of ${topic}?`, `How does this relate to the overall problem?`, `What are the potential implications?` ] })), status: 'success' }; return { content: [{ type: 'text', text: `Topic: ${topic}\nSteps: ${steps}\n\n${thinkingChain.chain.map(s => `${s.step}. ${s.title}\n ${s.content}\n Q: ${s.questions.join(', ')}`).join('\n\n')}` }] }; }
- The ToolDefinition object defining the schema, name, description, input schema (topic required, steps optional), and annotations for the create_thinking_chain tool.export const createThinkingChainDefinition: ToolDefinition = { name: 'create_thinking_chain', description: 'thinking process|chain of thought|reasoning chain|thought flow|sequential thinking - Create sequential thinking chain', inputSchema: { type: 'object', properties: { topic: { type: 'string', description: 'Topic to think about' }, steps: { type: 'number', description: 'Number of thinking steps' } }, required: ['topic'] }, annotations: { title: 'Create Thinking Chain', audience: ['user', 'assistant'] } };
- src/index.ts:112-118 (registration)Registration of the tool definition in the main tools array used for MCP ListTools endpoint, enabling tool discovery.// Sequential Thinking Tools createThinkingChainDefinition, analyzeProblemDefinition, stepByStepAnalysisDefinition, breakDownProblemDefinition, thinkAloudProcessDefinition, formatAsPlanDefinition,
- src/index.ts:615-627 (registration)Registration in the executeToolCall switch dispatcher, mapping the tool name to its handler execution for MCP CallTool requests.// Sequential Thinking Tools case 'create_thinking_chain': return await createThinkingChain(args as any) as CallToolResult; case 'analyze_problem': return await analyzeProblem(args as any) as CallToolResult; case 'step_by_step_analysis': return await stepByStepAnalysis(args as any) as CallToolResult; case 'break_down_problem': return await breakDownProblem(args as any) as CallToolResult; case 'think_aloud_process': return await thinkAloudProcess(args as any) as CallToolResult; case 'format_as_plan': return await formatAsPlan(args as any) as CallToolResult;