Skip to main content
Glama

aida_bug_fix

Mark bugs as resolved in AI development analytics. Log bug fixes with ID and solution details to improve coding patterns.

Instructions

当你修复了一个 bug 后调用。标记 bug 为已修复。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bugIdYesBug ID,如 BUG-01
fixNo修复方案简述

Implementation Reference

  • The implementation of the aida_bug_fix tool handler. It updates the bug status to fixed, records tokens, and saves the changes.
    function handleBugFix(args: any): any {
      const { path, data } = ensureRunJson();
      const bug = data.bugs.find(b => b.bugId === args.bugId);
      if (!bug) return { success: false, message: `Bug ${args.bugId} 未找到` };
    
      bug.status = 'fixed';
      bug.fixedAt = now();
      if (args.fix) bug.fix = args.fix;
    
      // Auto-collect tokens for bug fix
      let bugTokens = 0;
      if (bug.reportedAt && bug.fixedAt) {
        bugTokens = getTaskTokens(bug.reportedAt, bug.fixedAt);
        if (bugTokens > 0) {
          (bug as any).tokensConsumed = bugTokens;
          if (!data.cost) data.cost = {};
          if (!data.cost.tokenBreakdown) data.cost.tokenBreakdown = [];
          data.cost.tokenBreakdown.push({
            stage: `bugfix:${args.bugId}`,
            tokens: bugTokens,
          });
        }
      }
    
      addEvent(data, 'bug_fixed', { bugId: args.bugId, tokensConsumed: bugTokens });
      addTimeline(data, 'bug-fix', `${args.bugId}: ${bug.title}`);
      save(path, data);
      syncTokenUsage(path, data);
    
      const tokenMsg = bugTokens > 0 ? ` (${bugTokens} tokens)` : '';
      return { success: true, message: `${args.bugId} 已修复${tokenMsg}` };
    }
  • The switch-case registration for the aida_bug_fix tool.
    case 'aida_bug_fix':
      result = handleBugFix(args);
      break;

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/LWTlong/ai-dev-analytics'

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