Skip to main content
Glama

dev.code.execute

Execute source code securely in a sandboxed environment supporting 71+ programming languages. Returns execution results including stdout, stderr, time, and memory usage with configurable CPU and memory limits.

Instructions

Execute source code in a sandboxed environment — 71 programming languages supported (Python, JavaScript, Java, C++, Go, Rust, C#, Bash, Ruby, PHP, and 60+ more). Returns stdout, stderr, execution time, and memory usage. Safe sandboxed execution with CPU/memory limits. Use code.languages to get language IDs (Judge0 CE)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
language_idYesLanguage ID from code.languages (e.g. 71=Python 3, 63=JavaScript, 62=Java, 54=C++, 60=Go, 73=Rust, 51=C#, 46=Bash). Call code.languages for full list
source_codeYesSource code to execute
stdinNoStandard input to feed to the program
cpu_time_limitNoCPU time limit in seconds (default 5, max 15)
memory_limitNoMemory limit in KB (default 128000 = 128MB)
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/whiteknightonhorse/APIbase'

If you have feedback or need assistance with the MCP directory API, please join our Discord server