Skip to main content
Glama
debugging-approach.ts1.27 kB
/** * Debugging Approach Operation * * Implements debugging methodologies like Binary Search, Root Cause Analysis, etc. */ import { BaseOperation, type OperationContext, type OperationResult } from '../base.js'; export class DebuggingApproachOperation extends BaseOperation { name = 'debugging_approach'; category = 'core'; async execute(context: OperationContext): Promise<OperationResult> { const { sessionState, prompt, parameters } = context; const debugData = { approachName: this.getParam(parameters, 'approach', 'binary_search'), issue: prompt, steps: this.getParam(parameters, 'steps', []), findings: this.getParam(parameters, 'findings', ''), resolution: this.getParam(parameters, 'resolution', ''), }; sessionState.addDebuggingSession(debugData as any); const allSessions = sessionState.getDebuggingSessions(); return this.createResult({ ...debugData, sessionContext: { sessionId: sessionState.sessionId, totalSessions: allSessions.length, recentSessions: allSessions .slice(-3) .map((s) => ({ approachName: s.approachName, issue: s.issue })), }, }); } } export default new DebuggingApproachOperation();

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/waldzellai/clearthought-onepointfive'

If you have feedback or need assistance with the MCP directory API, please join our Discord server