Skip to main content
Glama
ThinkFar

Clear Thought Server

decisionframework

Systematically evaluate complex decisions by structuring options, criteria, and outcomes. Supports frameworks like weighted criteria, decision trees, and scenario analysis to enhance rational decision-making.

Instructions

A detailed tool for structured decision analysis and rational choice. This tool helps models systematically evaluate options, criteria, and outcomes. It supports multiple decision frameworks, probability estimates, and value judgments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
analysisTypeYes
constraintsNo
criteriaNo
decisionIdYesUnique identifier for this decision analysis
decisionStatementYes
iterationYesCurrent iteration of the decision process
nextStageNeededYesWhether another stage is needed in the process
optionsYes
possibleOutcomesNo
rationaleNo
recommendationNo
riskToleranceNo
stageYes
stakeholdersNo
timeHorizonNo

Implementation Reference

  • The primary handler function for the 'decisionframework' tool. It validates the input data, formats a detailed console output using chalk for visualization, and returns the validated DecisionFrameworkData.
    public processDecisionFramework(input: unknown): DecisionFrameworkData { const validatedData = this.validateInputData(input); // Log formatted output to console const formattedOutput = this.formatOutput(validatedData); console.error(formattedOutput); return validatedData; }
  • TypeScript interface defining the complete structure of DecisionFrameworkData, used for type safety and input validation in the tool handler.
    export interface DecisionFrameworkData { decisionStatement: string; options: OptionData[]; criteria?: CriterionData[]; analysisType: | "pros-cons" | "weighted-criteria" | "decision-tree" | "expected-value" | "scenario-analysis"; stage: | "problem-definition" | "options-generation" | "criteria-definition" | "evaluation" | "sensitivity-analysis" | "decision"; stakeholders?: string[]; constraints?: string[]; timeHorizon?: string; riskTolerance?: "risk-averse" | "risk-neutral" | "risk-seeking"; possibleOutcomes?: OutcomeData[]; recommendation?: string; rationale?: string; decisionId: string; iteration: number; nextStageNeeded: boolean; }
  • src/index.ts:417-530 (registration)
    Tool registration object DECISION_FRAMEWORK_TOOL defining the name, description, and detailed inputSchema for the MCP tool protocol.
    const DECISION_FRAMEWORK_TOOL: Tool = { name: "decisionframework", description: `A detailed tool for structured decision analysis and rational choice. This tool helps models systematically evaluate options, criteria, and outcomes. It supports multiple decision frameworks, probability estimates, and value judgments.`, inputSchema: { type: "object", properties: { decisionStatement: { type: "string" }, options: { type: "array", items: { type: "object", properties: { id: { type: "string" }, name: { type: "string" }, description: { type: "string" }, }, required: ["name", "description"], }, }, criteria: { type: "array", items: { type: "object", properties: { id: { type: "string" }, name: { type: "string" }, description: { type: "string" }, weight: { type: "number", minimum: 0, maximum: 1 }, }, required: ["name", "description", "weight"], }, }, analysisType: { type: "string", enum: [ "pros-cons", "weighted-criteria", "decision-tree", "expected-value", "scenario-analysis", ], }, stage: { type: "string", enum: [ "problem-definition", "options-generation", "criteria-definition", "evaluation", "sensitivity-analysis", "decision", ], }, stakeholders: { type: "array", items: { type: "string" } }, constraints: { type: "array", items: { type: "string" } }, timeHorizon: { type: "string" }, riskTolerance: { type: "string", enum: ["risk-averse", "risk-neutral", "risk-seeking"], }, possibleOutcomes: { type: "array", items: { type: "object", properties: { id: { type: "string" }, description: { type: "string" }, probability: { type: "number", minimum: 0, maximum: 1 }, value: { type: "number" }, optionId: { type: "string" }, confidenceInEstimate: { type: "number", minimum: 0, maximum: 1, }, }, required: [ "description", "probability", "optionId", "value", "confidenceInEstimate", ], }, }, recommendation: { type: "string" }, rationale: { type: "string" }, decisionId: { type: "string", description: "Unique identifier for this decision analysis", }, iteration: { type: "number", minimum: 0, description: "Current iteration of the decision process", }, nextStageNeeded: { type: "boolean", description: "Whether another stage is needed in the process", }, }, required: [ "decisionStatement", "options", "analysisType", "stage", "decisionId", "iteration", "nextStageNeeded", ], }, };
  • src/index.ts:1110-1122 (registration)
    Dispatch handler in the CallToolRequestSchema switch statement that routes 'decisionframework' calls to the DecisionFrameworkServer.processDecisionFramework method.
    case "decisionframework": { const result = decisionFrameworkServer.processDecisionFramework( request.params.arguments ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Helper method that validates the input data against required fields and types for DecisionFrameworkData.
    private validateInputData(input: unknown): DecisionFrameworkData { const data = input as DecisionFrameworkData; if (!data.decisionStatement || !data.options || !data.analysisType || !data.stage || !data.decisionId) { throw new Error("Invalid input for DecisionFramework: Missing required fields."); } if (typeof data.iteration !== 'number' || data.iteration < 0) { throw new Error("Invalid iteration value for DecisionFrameworkData."); } if (typeof data.nextStageNeeded !== 'boolean') { throw new Error("Invalid nextStageNeeded value for DecisionFrameworkData."); } return data; }

Other Tools

Related Tools

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