Explain a Solana program error code
explain_errorLooks up what a custom program error code means for a given program, using 1,800+ named errors from major Solana programs plus the runtime's own errors. Use it when you only have a code such as 6001 or 0x1771 from a simulation or an RPC response.
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": {
"programId": "<programId>",
"code": "<code>"
},
"name": "explain_error"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Error code as a number, or a hex string like 0x1771. | |
| programId | Yes | Base58 address of the program that raised the error. |