Skip to main content
Glama

create_thinking_chain

Generate sequential reasoning chains to structure complex thinking processes by breaking topics into logical steps for clearer analysis.

Instructions

생각 과정|사고 흐름|연쇄적으로|thinking process|chain of thought|reasoning chain - Create sequential thinking chain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic to think about
stepsNoNumber of thinking steps

Implementation Reference

  • The main handler function that implements the create_thinking_chain tool. It generates a structured 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 object defining the input schema, description, name, and annotations for the create_thinking_chain tool.
    export const createThinkingChainDefinition: ToolDefinition = {
      name: 'create_thinking_chain',
      description: '생각 과정|사고 흐름|연쇄적으로|thinking process|chain of thought|reasoning chain - 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'],
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false
      }
    };
  • src/index.ts:155-212 (registration)
    The toolHandlers registry where the create_thinking_chain handler is registered for dynamic dispatch during tool calls.
    const toolHandlers: Record<string, ToolHandler> = {
      // Time & UI
      'get_current_time': getCurrentTime,
      'preview_ui_ascii': previewUiAscii,
    
      // Memory - Basic
      'save_memory': saveMemory,
      'recall_memory': recallMemory,
      'update_memory': updateMemory,
      'delete_memory': deleteMemory,
      'list_memories': listMemories,
      'prioritize_memory': prioritizeMemory,
    
      // Memory - Graph (v2.0 NEW)
      'link_memories': linkMemories,
      'get_memory_graph': getMemoryGraph,
      'search_memories_advanced': searchMemoriesAdvanced,
      'create_memory_timeline': createMemoryTimeline,
    
      // Memory - Session Context (v2.1 NEW)
      'get_session_context': getSessionContext,
    
      // Code Analysis
      'find_symbol': findSymbol,
      'find_references': findReferences,
      'analyze_dependency_graph': analyzeDependencyGraph,
    
      // Code Quality
      'get_coding_guide': getCodingGuide,
      'apply_quality_rules': applyQualityRules,
      'validate_code_quality': validateCodeQuality,
      'analyze_complexity': analyzeComplexity,
      'check_coupling_cohesion': checkCouplingCohesion,
      'suggest_improvements': suggestImprovements,
    
      // Thinking
      'create_thinking_chain': createThinkingChain,
      'analyze_problem': analyzeProblem,
      'step_by_step_analysis': stepByStepAnalysis,
      'format_as_plan': formatAsPlan,
    
      // Planning
      'generate_prd': generatePrd,
      'create_user_stories': createUserStories,
      'analyze_requirements': analyzeRequirements,
      'feature_roadmap': featureRoadmap,
    
      // Prompt
      'enhance_prompt': enhancePrompt,
      'analyze_prompt': analyzePrompt,
      'enhance_prompt_gemini': enhancePromptGemini,
    
      // Reasoning
      'apply_reasoning_framework': applyReasoningFramework,
    
      // Analytics (v2.0 NEW)
      'get_usage_analytics': getUsageAnalytics
    };
  • src/index.ts:88-145 (registration)
    The tools array registration where the createThinkingChainDefinition is listed for the ListTools endpoint.
    const tools = [
      // Core Utilities (2)
      getCurrentTimeDefinition,
      previewUiAsciiDefinition,
    
      // Memory Management - Basic (6)
      saveMemoryDefinition,
      recallMemoryDefinition,
      updateMemoryDefinition,
      deleteMemoryDefinition,
      listMemoriesDefinition,
      prioritizeMemoryDefinition,
    
      // Memory Management - Graph (4) - v2.0 NEW
      linkMemoriesDefinition,
      getMemoryGraphDefinition,
      searchMemoriesAdvancedDefinition,
      createMemoryTimelineDefinition,
    
      // Memory Management - Session Context (1) - v2.1 NEW
      getSessionContextDefinition,
    
      // Code Analysis - Semantic (2)
      findSymbolDefinition,
      findReferencesDefinition,
    
      // Code Analysis - Advanced (1) - v2.0 NEW
      analyzeDependencyGraphDefinition,
    
      // Code Quality (6)
      getCodingGuideDefinition,
      applyQualityRulesDefinition,
      validateCodeQualityDefinition,
      analyzeComplexityDefinition,
      checkCouplingCohesionDefinition,
      suggestImprovementsDefinition,
    
      // Thinking & Planning (8)
      createThinkingChainDefinition,
      analyzeProblemDefinition,
      stepByStepAnalysisDefinition,
      formatAsPlanDefinition,
      generatePrdDefinition,
      createUserStoriesDefinition,
      analyzeRequirementsDefinition,
      featureRoadmapDefinition,
    
      // Prompt Engineering (3)
      enhancePromptDefinition,
      analyzePromptDefinition,
      enhancePromptGeminiDefinition,
    
      // Reasoning (1)
      applyReasoningFrameworkDefinition,
    
      // Analytics (1) - v2.0 NEW
      getUsageAnalyticsDefinition
    ];

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/su-record/hi-ai'

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