Skip to main content
Glama

fix_bug

Fix bugs in code by analyzing problematic code snippets and error descriptions to provide corrected solutions.

Instructions

让 QA 专家修复 Bug

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes有 Bug 的代码
errorYes错误信息或 Bug 描述

Implementation Reference

  • Handler function for the 'fix_bug' tool. Parses input arguments (code and error), defines a specialized bug-fixing expert role, prompts the orchestrator to fix the bug using a 'powerful' tier model, and returns the response.
    case 'fix_bug': { const { code, error } = args as { code: string; error: string }; const fixRole = '你是一位资深 Bug 修复专家,擅长分析错误信息并提供修复方案。请分析问题根因,给出修复后的完整代码。'; const fix = await orchestrator.askDynamicExpert( 'powerful', fixRole, `请修复以下代码中的 Bug:\n\n代码:\n\`\`\`\n${code}\n\`\`\`\n\n错误信息:${error}` ); return { content: [{ type: 'text', text: fix }], }; }
  • src/server.ts:183-200 (registration)
    Tool registration in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema requiring 'code' and 'error' fields.
    { name: 'fix_bug', description: '让 QA 专家修复 Bug', inputSchema: { type: 'object', properties: { code: { type: 'string', description: '有 Bug 的代码', }, error: { type: 'string', description: '错误信息或 Bug 描述', }, }, required: ['code', 'error'], }, },
  • Input schema definition for the 'fix_bug' tool, specifying object with required 'code' (buggy code) and 'error' (error description) string properties.
    inputSchema: { type: 'object', properties: { code: { type: 'string', description: '有 Bug 的代码', }, error: { type: 'string', description: '错误信息或 Bug 描述', }, }, required: ['code', 'error'], },

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/7836246/claude-team-mcp'

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