Skip to main content
Glama
ThinkFar

Clear Thought Server

scientificmethod

Apply formal scientific reasoning to questions by guiding through structured hypothesis testing, variable identification, and evidence evaluation.

Instructions

A detailed tool for applying formal scientific reasoning to questions and problems. This tool guides models through the scientific method with structured hypothesis testing. It enforces explicit variable identification, prediction making, and evidence evaluation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stageYes
observationNo
questionNo
hypothesisNo
experimentNo
analysisNo
conclusionNo
inquiryIdYesUnique identifier for this scientific inquiry
iterationYesCurrent iteration of the scientific process
nextStageNeededYesWhether another stage is needed in the process

Implementation Reference

  • Core handler function that validates input, processes hypothesis and experiment data, formats detailed output for logging, and returns structured JSON response with status.
    public processScientificMethod(input: unknown): { content: Array<{ type: string; text: string }>; isError?: boolean } { try { const validatedData = this.validateInputData(input); const processedData: ScientificInquiryData = { ...validatedData, hypothesis: this.processHypothesis(validatedData.hypothesis), experiment: this.processExperiment(validatedData.experiment) }; const formattedOutput = this.formatOutput(processedData); console.error(formattedOutput); return { content: [{ type: "text", text: JSON.stringify({ stage: processedData.stage, inquiryId: processedData.inquiryId, iteration: processedData.iteration, nextStageNeeded: processedData.nextStageNeeded, status: 'success' }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: error instanceof Error ? error.message : String(error), status: 'failed' }, null, 2) }], isError: true }; } }
  • Tool definition object including name, description, and comprehensive inputSchema defining validation for all stages of scientific inquiry (observation, hypothesis with variables/assumptions, experiment with predictions/controls, etc.).
    const SCIENTIFIC_METHOD_TOOL: Tool = { name: "scientificmethod", description: `A detailed tool for applying formal scientific reasoning to questions and problems. This tool guides models through the scientific method with structured hypothesis testing. It enforces explicit variable identification, prediction making, and evidence evaluation.`, inputSchema: { type: "object", properties: { stage: { type: "string", enum: [ "observation", "question", "hypothesis", "experiment", "analysis", "conclusion", "iteration", ], }, observation: { type: "string" }, question: { type: "string" }, hypothesis: { type: "object", properties: { statement: { type: "string" }, variables: { type: "array", items: { type: "object", properties: { name: { type: "string" }, type: { type: "string", enum: [ "independent", "dependent", "controlled", "confounding", ], }, operationalization: { type: "string" }, }, required: ["name", "type"], }, }, assumptions: { type: "array", items: { type: "string" } }, hypothesisId: { type: "string" }, confidence: { type: "number", minimum: 0, maximum: 1 }, domain: { type: "string" }, iteration: { type: "number", minimum: 0 }, alternativeTo: { type: "array", items: { type: "string" } }, refinementOf: { type: "string" }, status: { type: "string", enum: [ "proposed", "testing", "supported", "refuted", "refined", ], }, }, required: [ "statement", "variables", "assumptions", "hypothesisId", "confidence", "domain", "iteration", "status", ], }, experiment: { type: "object", properties: { design: { type: "string" }, methodology: { type: "string" }, predictions: { type: "array", items: { type: "object", properties: { if: { type: "string" }, then: { type: "string" }, else: { type: "string" }, }, required: ["if", "then"], }, }, experimentId: { type: "string" }, hypothesisId: { type: "string" }, controlMeasures: { type: "array", items: { type: "string" }, }, results: { type: "string" }, outcomeMatched: { type: "boolean" }, unexpectedObservations: { type: "array", items: { type: "string" }, }, limitations: { type: "array", items: { type: "string" } }, nextSteps: { type: "array", items: { type: "string" } }, }, required: [ "design", "methodology", "predictions", "experimentId", "hypothesisId", "controlMeasures", ], }, analysis: { type: "string" }, conclusion: { type: "string" }, inquiryId: { type: "string", description: "Unique identifier for this scientific inquiry", }, iteration: { type: "number", minimum: 0, description: "Current iteration of the scientific process", }, nextStageNeeded: { type: "boolean", description: "Whether another stage is needed in the process", }, }, required: ["stage", "inquiryId", "iteration", "nextStageNeeded"], }, };
  • src/index.ts:996-1012 (registration)
    Registration of the 'scientificmethod' tool in the MCP server's capabilities, making it available via listTools and callTool.
    capabilities: { tools: { sequentialthinking: SEQUENTIAL_THINKING_TOOL, mentalmodel: MENTAL_MODEL_TOOL, designpattern: DESIGN_PATTERN_TOOL, programmingparadigm: PROGRAMMING_PARADIGM_TOOL, debuggingapproach: DEBUGGING_APPROACH_TOOL, collaborativereasoning: COLLABORATIVE_REASONING_TOOL, decisionframework: DECISION_FRAMEWORK_TOOL, metacognitivemonitoring: METACOGNITIVE_MONITORING_TOOL, scientificmethod: SCIENTIFIC_METHOD_TOOL, structuredargumentation: STRUCTURED_ARGUMENTATION_TOOL, visualreasoning: VISUAL_REASONING_TOOL, }, }, } );
  • src/index.ts:1137-1149 (registration)
    Dispatcher switch case that handles CallToolRequest for 'scientificmethod' by invoking the ScientificMethodServer's process method and formatting response.
    case "scientificmethod": { const result = scientificMethodServer.processScientificMethod( request.params.arguments ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • TypeScript interfaces defining the structure for scientific inquiry data, hypothesis (with variables, assumptions), experiment (with predictions, controls), used for type safety and matching inputSchema.
    export interface Variable { name: string; type: "independent" | "dependent" | "controlled" | "confounding"; operationalization?: string; } export interface HypothesisData { statement: string; variables: Variable[]; assumptions: string[]; hypothesisId: string; confidence: number; domain: string; iteration: number; alternativeTo?: string[]; refinementOf?: string; status: "proposed" | "testing" | "supported" | "refuted" | "refined"; } export interface Prediction { if: string; then: string; else?: string; } export interface ExperimentData { design: string; methodology: string; predictions: Prediction[]; experimentId: string; hypothesisId: string; controlMeasures: string[]; results?: string; outcomeMatched?: boolean; unexpectedObservations?: string[]; limitations?: string[]; nextSteps?: string[]; } export interface ScientificInquiryData { stage: | "observation" | "question" | "hypothesis" | "experiment" | "analysis" | "conclusion" | "iteration"; observation?: string; question?: string; hypothesis?: HypothesisData; experiment?: ExperimentData; analysis?: string; conclusion?: string; inquiryId: string; iteration: number; nextStageNeeded: boolean; }

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