Skip to main content
Glama
Trigodil
by Trigodil

run_code

Execute code snippets directly without saving to disk for quick one-off runs. Supports Python, JavaScript, Java, C++, Go, Rust, and more.

Instructions

Execute a code snippet directly without saving to disk. Use for quick one-off runs. If you already wrote the code with write_file, use run_file instead to avoid writing twice. Supported: python, javascript, typescript, java, cpp, csharp, go, rust, ruby, php, r, kotlin, swift, matlab

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
codeYes
languageYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses that execution happens without saving to disk and is intended for quick one-off runs, which implies ephemerality. However, it does not mention potential side effects, sandboxing, network access, or execution limits, which is a notable gap for a code execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each with a distinct purpose: core action, usage guidance, and supported languages. No redundancy or filler, and the most critical information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's core purpose, usage context, and language support, and the presence of an output schema may cover return values. However, it omits explanation of the cwd parameter and does not address safety or environmental behavior, making it only moderately complete for a code execution tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has zero description coverage, and the description only partially compensates. It lists supported languages (useful for the language parameter) and implicitly defines code as a snippet, but does not mention or explain the cwd parameter at all.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource combination ('Execute a code snippet directly') and immediately clarifies the no-disk-save behavior. It distinguishes from run_file by naming it as the alternative for already-written code, and the supported language list defines scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('quick one-off runs') and provides a clear when-not scenario with an alternative tool ('If you already wrote the code with write_file, use run_file instead'). However, it does not differentiate from run_shell or language-specific wrappers like run_python/run_cpp, leaving some sibling boundaries implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/Trigodil/jan-terminal-mcp'

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