Skip to main content
Glama
ThinkFar

Clear Thought Server

debuggingapproach

Apply systematic debugging methods like binary search and cause elimination to identify and resolve technical issues through structured problem-solving approaches.

Instructions

A tool for applying systematic debugging approaches to solve technical issues. Supports various debugging methods including:

  • Binary Search

  • Reverse Engineering

  • Divide and Conquer

  • Backtracking

  • Cause Elimination

  • Program Slicing

Each approach provides a structured method for identifying and resolving issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
approachNameYes
issueYes
stepsNo
findingsNo
resolutionNo

Implementation Reference

  • The main handler method 'processApproach' that executes the tool logic: validates input, formats and logs output, returns structured success/error response.
    public processApproach(input: unknown): { content: Array<{ type: string; text: string }>; isError?: boolean } { try { const validatedInput = this.validateApproachData(input); const formattedOutput = this.formatApproachOutput(validatedInput); console.error(formattedOutput); return { content: [{ type: "text", text: JSON.stringify({ approachName: validatedInput.approachName, status: 'success', hasSteps: validatedInput.steps.length > 0, hasResolution: !!validatedInput.resolution }, 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 }; } }
  • The Tool definition including name, description, and inputSchema for validation (JSON Schema).
    const DEBUGGING_APPROACH_TOOL: Tool = { name: "debuggingapproach", description: `A tool for applying systematic debugging approaches to solve technical issues. Supports various debugging methods including: - Binary Search - Reverse Engineering - Divide and Conquer - Backtracking - Cause Elimination - Program Slicing Each approach provides a structured method for identifying and resolving issues.`, inputSchema: { type: "object", properties: { approachName: { type: "string", enum: [ "binary_search", "reverse_engineering", "divide_conquer", "backtracking", "cause_elimination", "program_slicing", ], }, issue: { type: "string" }, steps: { type: "array", items: { type: "string" }, }, findings: { type: "string" }, resolution: { type: "string" }, }, required: ["approachName", "issue"], }, };
  • src/index.ts:997-1009 (registration)
    Registration of the tool in server capabilities under 'tools.debuggingapproach'.
    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:1083-1095 (registration)
    Dispatch/registration in CallToolRequestSchema handler: calls debuggingServer.processApproach and formats response.
    case "debuggingapproach": { const result = debuggingServer.processApproach( request.params.arguments ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Helper method for input validation, enforcing schema and casting to DebuggingApproachData.
    private validateApproachData(input: unknown): DebuggingApproachData { const data = input as Record<string, unknown>; if (!data.approachName || typeof data.approachName !== 'string') { throw new Error('Invalid approachName: must be a string'); } if (!data.issue || typeof data.issue !== 'string') { throw new Error('Invalid issue: must be a string'); } return { approachName: data.approachName as string, issue: data.issue as string, steps: Array.isArray(data.steps) ? data.steps.map(String) : [], findings: typeof data.findings === 'string' ? data.findings as string : '', resolution: typeof data.resolution === 'string' ? data.resolution as 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