lean_run_code
Execute self-contained Lean code snippets with imports and return diagnostics to check correctness and surface errors.
Instructions
Run a code snippet and return diagnostics. Must include all imports.
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": {
"code": "<code>"
},
"name": "lean_run_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Self-contained Lean code with imports |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Whether code compiled successfully | |
| timed_out | No | True if elaboration timed out (results are partial) | |
| diagnostics | No | Compiler diagnostics |