debug_code
Debug statistical code in R, Stata, or Python by analyzing error messages and problematic code segments to identify and resolve programming issues.
Instructions
통계 코드 디버깅 도움
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 문제 코드 | |
| error_message | Yes | 에러 메시지 | |
| language | Yes | 언어 |
Implementation Reference
- src/tools/index.ts:1686-1697 (handler)The handler function for 'debug_code' tool. It takes code, error_message, and language as input and returns generic debugging suggestions.function handleDebugCode(args: Record<string, unknown>) { return { error: args.error_message, language: args.language, suggestions: [ "Check variable names and data types", "Verify data structure (missing values, duplicates)", "Check package/library installation", "Review function syntax and arguments" ] }; }
- src/tools/index.ts:441-449 (schema)Input schema definition for the 'debug_code' tool, specifying parameters: code (string), error_message (string), language (enum: r, stata, python). All required.inputSchema: { type: "object", properties: { code: { type: "string", description: "문제 코드" }, error_message: { type: "string", description: "에러 메시지" }, language: { type: "string", enum: ["r", "stata", "python"], description: "언어" }, }, required: ["code", "error_message", "language"], },
- src/tools/index.ts:438-450 (registration)Registration of the 'debug_code' tool in the exported tools array, including name, description, and input schema.{ name: "debug_code", description: "통계 코드 디버깅 도움", inputSchema: { type: "object", properties: { code: { type: "string", description: "문제 코드" }, error_message: { type: "string", description: "에러 메시지" }, language: { type: "string", enum: ["r", "stata", "python"], description: "언어" }, }, required: ["code", "error_message", "language"], }, },
- src/tools/index.ts:844-845 (registration)Dispatch/registration of 'debug_code' handler in the handleToolCall switch statement.case "debug_code": return handleDebugCode(args);