Execute Code
execute_codeRun code snippets in Python, Node.js, or Bash to compute, transform data, or test logic. Returns exit code and captured output.
Instructions
Run a snippet of code and return its output. Use this to compute, transform data, or test logic instead of doing it in your head.
Args:
language ('python'|'node'|'bash'): Interpreter to use.
code (string): The source code. Print results to stdout.
stdin (string): Optional text piped to the program's stdin.
Returns exit code plus captured stdout/stderr. Killed after the configured timeout.
Example: { "language": "python", "code": "print(sum(range(100)))" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | Interpreter | |
| code | Yes | Source code to run | |
| stdin | No | Optional stdin input |