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
| Name | Required | Description | Default |
|---|---|---|---|
| analysisType | Yes | ||
| constraints | No | ||
| criteria | No | ||
| decisionId | Yes | Unique identifier for this decision analysis | |
| decisionStatement | Yes | ||
| iteration | Yes | Current iteration of the decision process | |
| nextStageNeeded | Yes | Whether another stage is needed in the process | |
| options | Yes | ||
| possibleOutcomes | No | ||
| rationale | No | ||
| recommendation | No | ||
| riskTolerance | No | ||
| stage | Yes | ||
| stakeholders | No | ||
| timeHorizon | No |
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; }
- src/models/interfaces.ts:149-176 (schema)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; }