check_vulnerability
Check a Solidity contract for a specific vulnerability class like reentrancy or integer overflow. Get severity, SWC ID, and fix recommendation for quick spot-checks during development.
Instructions
Targeted check for a single vulnerability class (e.g. 'reentrancy', 'integer-overflow', 'access-control', 'tx.origin', 'unchecked-call'). Returns whether the contract is vulnerable, the severity, an SWC id, and a fix recommendation. Use this for quick spot-checks during development.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>",
"vulnClass": "<vulnClass>"
},
"name": "check_vulnerability"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | The full Solidity source code to check. | |
| vulnClass | Yes | The vulnerability class to check for, e.g. 'reentrancy', 'integer-overflow', 'access-control'. |