Run code
run_codeRun code the way the Run button of a code block does, to check it: "sql", "mongodb", "redis" and "clickhouse" run in your own database of the presentation (made from its database scripts; what you change stays in it), "python" and "bash" in a sandbox without network that keeps nothing. The presentation itself does not change.
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": {
"slug": "<slug>",
"lang": "<lang>",
"code": "<code>"
},
"name": "run_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code (at most 20000 characters). | |
| lang | Yes | Language of the code. | |
| slug | Yes | The presentation's slug (its address: /movie/<slug>/). | |
| reset | No | sql, mongodb, redis, clickhouse: first make your database again from the script of the presentation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | Yes | ||
| stderr | No | ||
| stdout | No | ||
| notices | No | ||
| omitted | No | ||
| results | No | ||
| exit_code | No | ||
| sql_error | No | ||
| timed_out | No | ||
| elapsed_ms | No |