Skip to main content
Glama
ThinkFar

Clear Thought Server

mentalmodel

Apply structured mental models like First Principles Thinking and Pareto Principle to systematically break down and solve complex problems.

Instructions

A tool for applying structured mental models to problem-solving. Supports various mental models including:

  • First Principles Thinking

  • Opportunity Cost Analysis

  • Error Propagation Understanding

  • Rubber Duck Debugging

  • Pareto Principle

  • Occam's Razor

Each model provides a systematic approach to breaking down and solving problems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameYes
problemYes
stepsNo
reasoningNo
conclusionNo

Implementation Reference

  • Core execution logic of the 'mentalmodel' tool: validates input data, formats and logs a structured output to console using chalk, and returns a JSON-serializable result with status, model metadata, or error.
    public processModel(input: unknown): any { try { const validatedInput = this.validateModelData(input); const formattedOutput = this.formatModelOutput(validatedInput); console.error(formattedOutput); return { modelName: validatedInput.modelName, status: "success", hasSteps: validatedInput.steps.length > 0, hasConclusion: !!validatedInput.conclusion, }; } catch (error) { return { error: error instanceof Error ? error.message : String(error), status: "failed", }; } }
  • JSON schema definition for the 'mentalmodel' tool, specifying input parameters like modelName (enum of mental models), required problem, and optional steps, reasoning, conclusion.
    const MENTAL_MODEL_TOOL: Tool = { name: "mentalmodel", description: `A tool for applying structured mental models to problem-solving. Supports various mental models including: - First Principles Thinking - Opportunity Cost Analysis - Error Propagation Understanding - Rubber Duck Debugging - Pareto Principle - Occam's Razor Each model provides a systematic approach to breaking down and solving problems.`, inputSchema: { type: "object", properties: { modelName: { type: "string", enum: [ "first_principles", "opportunity_cost", "error_propagation", "rubber_duck", "pareto_principle", "occams_razor", ], }, problem: { type: "string" }, steps: { type: "array", items: { type: "string" }, }, reasoning: { type: "string" }, conclusion: { type: "string" }, }, required: ["modelName", "problem"], }, };
  • src/index.ts:1046-1056 (registration)
    Registration and dispatch logic in the CallToolRequestSchema handler: matches tool name 'mentalmodel' and invokes modelServer.processModel with arguments, returning formatted text content.
    case "mentalmodel": { const result = modelServer.processModel(request.params.arguments); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:999-999 (registration)
    Registers the 'mentalmodel' tool in the server's capabilities.tools dictionary using the MENTAL_MODEL_TOOL definition.
    mentalmodel: MENTAL_MODEL_TOOL,
  • TypeScript interface defining the structure of MentalModelData used for validation and typing in the MentalModelServer.
    export interface MentalModelData { modelName: string; problem: string; steps: string[]; reasoning: string; conclusion: string; }

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/ThinkFar/clear-thought-mcp'

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