Pre Check Code
pre_check_codeScan code for risky patterns before making changes, using the current action and file path to identify potential errors and prevent debugging issues.
Instructions
主动预防:检查代码中可能的风险模式
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pre_check_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | 要检查的代码字符串 | |
| action | No | 正在尝试的操作描述(如 "用 try-catch 包裹") | |
| filepath | No | 要检查的文件路径 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |