Skip to main content
Glama
ThinkFar

Clear Thought Server

decisionframework

Analyze complex decisions using structured frameworks to evaluate options, criteria, and outcomes systematically.

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
decisionStatementYes
optionsYes
criteriaNo
analysisTypeYes
stageYes
stakeholdersNo
constraintsNo
timeHorizonNo
riskToleranceNo
possibleOutcomesNo
recommendationNo
rationaleNo
decisionIdYesUnique identifier for this decision analysis
iterationYesCurrent iteration of the decision process
nextStageNeededYesWhether another stage is needed in the process

Implementation Reference

  • Core handler function for the 'decisionframework' tool. Validates input using validateInputData, formats detailed output with chalk colors and logs to console.error, then returns the validated data.
    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;
    }
  • Helper method to format the DecisionFrameworkData into a colored, structured console output string using chalk for different sections like decision statement, options, criteria, etc.
    private formatOutput(data: DecisionFrameworkData): string {
      const { decisionStatement, options, analysisType, stage, iteration } = data;
      
      let output = `\n${chalk.bold.blue('Decision Framework Analysis')}\n`;
      output += `${chalk.bold.green('Decision Statement:')} ${decisionStatement}\n`;
      output += `${chalk.bold.yellow('Analysis Type:')} ${analysisType}\n`;
      output += `${chalk.bold.magenta('Stage:')} ${stage} (Iteration: ${iteration})\n`;
      
      // Options
      if (options.length > 0) {
        output += `\n${chalk.bold.cyan('Options:')}\n`;
        options.forEach((option, i) => {
          output += `${chalk.bold(`Option ${i+1}: ${option.name}`)}\n`;
          output += `${option.description}\n\n`;
        });
      }
      
      // Criteria
      if (data.criteria && data.criteria.length > 0) {
        output += `\n${chalk.bold.green('Criteria:')}\n`;
        data.criteria.forEach((criterion, i) => {
          output += `${chalk.bold(`${criterion.name} (weight: ${criterion.weight.toFixed(2)}):`)} `;
          output += `${criterion.description}\n`;
        });
      }
      
      // Stakeholders
      if (data.stakeholders && data.stakeholders.length > 0) {
        output += `\n${chalk.bold.yellow('Stakeholders:')} ${data.stakeholders.join(', ')}\n`;
      }
      
      // Constraints
      if (data.constraints && data.constraints.length > 0) {
        output += `\n${chalk.bold.red('Constraints:')}\n`;
        data.constraints.forEach((constraint, i) => {
          output += `${chalk.bold(`${i+1}.`)} ${constraint}\n`;
        });
      }
      
      // Recommendation
      if (data.recommendation) {
        output += `\n${chalk.bold.green('Recommendation:')}\n${data.recommendation}\n`;
        
        if (data.rationale) {
          output += `\n${chalk.bold.cyan('Rationale:')}\n${data.rationale}\n`;
        }
      }
      
      return output;
    }
  • Helper method to validate the input data against required fields and types for DecisionFrameworkData, throwing descriptive errors if invalid.
    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;
    }
  • TypeScript interface defining the structure of data for the decision framework tool, including required and optional fields matching the tool's input schema.
    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:1110-1122 (registration)
    Registration and dispatch handler in the MCP server's CallToolRequestHandler switch statement that routes 'decisionframework' tool calls to the DecisionFrameworkServer.processDecisionFramework method and formats the response.
    case "decisionframework": {
        const result = decisionFrameworkServer.processDecisionFramework(
            request.params.arguments
        );
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(result, null, 2),
                },
            ],
        };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal insight. It mentions 'systematically evaluate' and 'supports multiple decision frameworks' but doesn't describe what the tool actually does operationally—whether it performs calculations, generates reports, stores data, or requires specific permissions. For a complex tool with 15 parameters, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in three sentences that each add value: establishing purpose, core functions, and capabilities. There's no redundant information, though it could be more front-loaded with concrete action verbs. The length is appropriate for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 15 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool produces, how it handles the extensive input data, or what behavioral outcomes to expect. The gap between the description's generality and the schema's specificity creates ambiguity about the tool's actual operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 20%, so the description must compensate but fails to do so. It vaguely references 'options, criteria, and outcomes' and 'probability estimates, and value judgments' which map to some parameters, but doesn't explain the purpose or relationships of the 15 parameters. Key parameters like 'analysisType', 'stage', and 'possibleOutcomes' remain semantically unclear from the description alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'structured decision analysis and rational choice' with specific functions like evaluating options, criteria, and outcomes. It distinguishes from siblings by focusing on decision frameworks rather than reasoning methods, though it doesn't explicitly contrast with tools like 'structuredargumentation' or 'collaborativereasoning'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions supporting 'multiple decision frameworks' but doesn't specify scenarios where this tool is preferred over sibling tools like 'structuredargumentation' or 'mentalmodel', nor does it indicate prerequisites or exclusions for its use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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