Skip to main content
Glama

notes_insight

Analyze notes using TRILEMMA-PRINCIPLES framework with AI summarization to generate topic insights from Obsidian knowledge bases.

Instructions

Generate insights about a topic using TRILEMMA-PRINCIPLES framework with AI-powered summarization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic keyword or phrase to analyze
maxNotesNoMaximum number of notes to analyze (default: 5)
maxContextLengthNoMaximum context length in characters (default: 50000)
enableSummaryNoWhether to enable AI summarization for long notes (default: true)

Implementation Reference

  • Main handler for 'notes_insight' tool: searches vault for topic-related notes, selects top relevant ones, processes/summarizes content, generates TRILEMMA-PRINCIPLES insights.
    private async handleNotesInsight(args: any) {
      if (!args?.topic) {
        throw new Error('Topic is required');
      }
      
      const topic = args.topic;
      const maxNotes = args.maxNotes || 5;
      const maxContextLength = args.maxContextLength || 50000;
      const enableSummary = args.enableSummary !== undefined ? args.enableSummary : true;
      
      try {
        // Step 1: Search for relevant notes
        const searchResults = await this.searchVault(topic);
        
        // Step 2: Select most relevant notes
        const selectedNotes = await this.selectMostRelevantNotes(searchResults, maxNotes);
        
        // Step 3: Process notes content with AI summarization if needed
        const processedContent = await this.processNotesContent(
          selectedNotes, 
          maxContextLength, 
          enableSummary
        );
        
        // Step 4: Generate insights using TRILEMMA-PRINCIPLES framework
        const insights = await this.generateInsights(topic, processedContent);
        
        return {
          content: [
            {
              type: 'text',
              text: insights,
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to generate insights: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • Input schema definition for the notes_insight tool in the tools list.
    name: 'notes_insight',
    description: 'Generate insights about a topic using TRILEMMA-PRINCIPLES framework with AI-powered summarization',
    inputSchema: {
      type: 'object',
      properties: {
        topic: {
          type: 'string',
          description: 'Topic keyword or phrase to analyze'
        },
        maxNotes: {
          type: 'number',
          description: 'Maximum number of notes to analyze (default: 5)',
          default: 5
        },
        maxContextLength: {
          type: 'number',
          description: 'Maximum context length in characters (default: 50000)',
          default: 50000
        },
        enableSummary: {
          type: 'boolean',
          description: 'Whether to enable AI summarization for long notes (default: true)',
          default: true
        }
      },
      required: ['topic'],
    },
  • src/index.ts:1409-1410 (registration)
    Registration of notes_insight handler in the CallToolRequestSchema switch statement.
      return await this.handleNotesInsight(request.params.arguments);
    default:
  • Helper function loading the core TRILEMMA-PRINCIPLES framework prompt used for insight generation.
      private async loadTrilemmaPrompt(): Promise<string> {
        // Embedded complete TRILEMMA-PRINCIPLES framework prompt
        return `# TRILEMMA-PRINCIPLES Integrated Analysis Framework
    
    ## Your Role
    You are an expert strategic analyst capable of identifying structural constraints and breakthrough solutions. Your mission is to apply this integrated framework that combines the Mundell-Fleming Trilemma approach with First Principles Thinking to analyze complex problems and generate innovative solutions.
    
    ## Analysis Protocol
    
    ### LAYER 1: CONSTRAINT IDENTIFICATION (Trilemma Analysis)
    
    #### Step 1: Extract Core Trilemma Elements
    - Identify the three primary objectives/elements in the given scenario
    - Map the inherent conflicts between these elements
    - Analyze the current system's trade-off choices
    - **Output Format**: "The three conflicting elements are: [A], [B], and [C]"
    
    #### Step 2: Constraint Root Analysis
    Analyze the fundamental sources of constraints:
    - **Technical Constraints**: Current technological limitations
    - **Resource Constraints**: Scarcity of time, capital, human resources
    - **Institutional Constraints**: Legal, cultural, organizational barriers
    - **Physical Constraints**: Natural laws, physical limitations
    - **Output Format**: "The primary constraint sources are..."
    
    #### Step 3: Trade-off Consequence Assessment
    - Analyze short-term and long-term impacts of each trade-off option
    - Identify hidden costs and opportunity costs
    - Evaluate gains and losses for all stakeholders
    - **Output Format**: "If we prioritize [X] over [Y] and [Z], the consequences are..."
    
    ### LAYER 2: ASSUMPTION DECONSTRUCTION (First Principles Analysis)
    
    #### Step 4: Challenge Fundamental Assumptions
    Ask critical questions:
    - Are the preconditions of this trilemma necessarily true?
    - Are there overlooked fourth or fifth variables?
    - Are the definitions of each element too narrow?
    - **Output Format**: "The key assumptions to challenge are..."
    
    #### Step 5: Seek Root Principles
    - What are the essential needs behind each element?
    - Where is the true source of conflict?
    - Is there a more fundamental unifying principle?
    - **Output Format**: "The underlying principles reveal that..."
    
    #### Step 6: Redefine Boundary Conditions
    - Can temporal boundaries be adjusted?
    - Can spatial scope be expanded?
    - Can participating entities be recombined?
    - **Output Format**: "By redefining boundaries, we can..."
    
    ### LAYER 3: BREAKTHROUGH SOLUTION DESIGN
    
    #### Step 7: Dimensional Upgrade
    Explore solutions across multiple dimensions:
    - **Temporal Dimension**: Phase-based implementation to resolve conflicts
    - **Spatial Dimension**: Multi-layered, multi-regional solutions
    - **Entity Dimension**: Collaborative division of objectives
    - **Technological Dimension**: Innovation-driven game-changing approaches
    - **Output Format**: "The dimensional breakthrough opportunities are..."
    
    #### Step 8: New Equilibrium Design
    - Design system architecture that transcends trilemma constraints
    - Build dynamic rather than static balance
    - Create positive-sum rather than zero-sum games
    - **Output Format**: "The new equilibrium model involves..."
    
    #### Step 9: Implementation Pathway
    - Map transition path from current to target state
    - Design risk controls and contingency plans
    - Establish effectiveness evaluation and iteration mechanisms
    - **Output Format**: "The implementation strategy includes..."
    
    ## Analysis Template
    
    For each analysis, structure your response as follows:
    
    ### πŸ” **TRILEMMA IDENTIFICATION**
    [Apply Steps 1-3: Identify constraints and trade-offs]
    
    ### πŸ’­ **FIRST PRINCIPLES QUESTIONING** 
    [Apply Steps 4-6: Challenge assumptions and seek root causes]
    
    ### πŸš€ **BREAKTHROUGH SOLUTION**
    [Apply Steps 7-9: Design innovative solutions and implementation paths]
    
    ### πŸ“Š **SYNTHESIS & RECOMMENDATIONS**
    [Provide clear, actionable insights and next steps]
    
    ## Key Principles to Follow
    
    ### Dynamic Thinking
    - Constraints are not permanent
    - Technological progress can change the rules
    - System evolution may create new possibilities
    
    ### Multi-Level Analysis
    - Solutions may exist at different hierarchical levels
    - Micro-constraints β‰  Macro-constraints
    - Short-term conflicts may resolve in long-term
    
    ### Creative Problem-Solving
    - Best solutions often transcend original frameworks
    - Redefining problems is more important than solving them
    - Fourth-dimensional thinking is key to breakthroughs
    
    ## Quality Standards
    
    Your analysis should demonstrate:
    - **Accuracy** in constraint identification
    - **Depth** in assumption questioning  
    - **Creativity** in solution design
    - **Feasibility** in implementation planning
    
    ## Special Instructions
    
    1. **Always start with constraint identification** before jumping to solutions
    2. **Question every assumption explicitly** - don't accept conventional wisdom
    3. **Seek genuine breakthrough** rather than incremental improvements
    4. **Balance creativity with practicality** in your recommendations
    5. **Provide specific, actionable guidance** rather than abstract concepts
    
    Your goal is to help users see beyond apparent limitations and discover innovative pathways that transcend traditional trade-offs.`;
      }
  • Helper that constructs the insight generation prompt using the TRILEMMA framework and processed notes.
      private async generateInsights(topic: string, processedContent: string): Promise<string> {
        // Load the TRILEMMA-PRINCIPLES framework from the prepared file
        const trilemmaPrompt = await this.loadTrilemmaPrompt();
        
        // Construct the final prompt for insights generation
        const insightPrompt = `${trilemmaPrompt}
    
    ## Analysis Context
    
    **Topic**: ${topic}
    
    **Relevant Notes Content**:
    ${processedContent}
    
    ## Task
    
    Apply the TRILEMMA-PRINCIPLES framework to analyze the topic "${topic}" based on the provided notes content. Focus on identifying constraints, challenging assumptions, and proposing breakthrough solutions.
    
    Please provide your analysis following the framework structure:
    1. TRILEMMA IDENTIFICATION
    2. FIRST PRINCIPLES QUESTIONING  
    3. BREAKTHROUGH SOLUTION
    4. SYNTHESIS & RECOMMENDATIONS`;
    
        return insightPrompt;
      }

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/newtype-01/obsidian-mcp'

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