Skip to main content
Glama

create_thinking_chain

Generate structured reasoning chains to break down complex topics into sequential thinking steps for clearer analysis.

Instructions

thinking process|chain of thought|reasoning chain|thought flow|sequential thinking - Create sequential thinking chain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic to think about
stepsNoNumber of thinking steps

Implementation Reference

  • The main handler function that executes the create_thinking_chain tool, generating a structured sequential thinking chain with steps, titles, content, and questions for the given topic.
    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 schema defining the input schema, description, 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:616-617 (registration)
    Registration and dispatch of the create_thinking_chain tool in the main executeToolCall switch statement.
    case 'create_thinking_chain': return await createThinkingChain(args as any) as CallToolResult;
  • src/index.ts:113-113 (registration)
    Inclusion of the create_thinking_chain tool definition in the tools array for MCP tool listing.
    createThinkingChainDefinition,
  • src/index.ts:81-81 (registration)
    Import statement bringing in the handler and definition for create_thinking_chain.
    import { createThinkingChain, createThinkingChainDefinition } from './tools/thinking/createThinkingChain.js';

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/ssdeanx/ssd-ai'

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