Skip to main content
Glama
realugbun

AgentExecMPC

by realugbun

execute_code

Execute code in Python, Node.js, or Go with automatic environment setup and timeout controls. Runs code in isolated, non-persistent environments for secure execution.

Instructions

Execute code snippets in Python, Node.js, or Go with automatic environment setup.

This tool creates temporary files and executes code in isolated environments
with proper cleanup and timeout handling. Supports multiple programming
languages with their respective runtimes.

Supported Languages:
- Python: Full Python 3.x environment with standard library
- Node.js/JavaScript: Node.js runtime with npm packages
- Go: Go compiler and runtime environment with CGO_ENABLED=0

Features:
- Automatic temporary file management
- Language-specific execution environments
- Configurable timeout controls
- Detailed execution feedback
- Secure code isolation
- Temporary files are deleted after execution; code is non-persistent. Use the shell tool to create reusable scripts.

Args:
    request: Code execution parameters including code, language, and timeout

Returns:
    ExecutionResponse: Complete execution results with output, errors,
                      performance metrics, and success status

Examples:
- Python: {"code": "print('Hello World')", "language": "python"}
- Node.js: {"code": "console.log('Hello World')", "language": "node"}
- Go: {"code": "package main\nfunc main() { println("Hello") }", "language": "go"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: temporary files, isolated environments, proper cleanup, timeout handling, non-persistent code, and secure isolation. No contradictions.

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?

The description is well-structured with sections, bullet points, and examples. Every sentence adds value, and the main action is front-loaded. No redundant text.

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

Completeness5/5

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

Given the tool's complexity (multiple languages, timeout, isolation), the description covers all key aspects: supported languages, features, execution details, and return type. No output schema, but the description explains the response structure.

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

Parameters4/5

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

The single parameter 'request' is a nested object with its properties described in the schema. The description adds value by listing the included parameters (code, language, timeout), providing examples, and explaining features, but does not add significant meaning beyond the schema's subfield descriptions.

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 clearly states the tool executes code snippets in Python, Node.js, or Go with automatic environment setup. It lists supported languages and features, and distinguishes from sibling tool 'shell' by stating to use shell for reusable scripts.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use (execute code snippets) and when not to (not for persistent scripts), with alternatives mentioned ('Use the shell tool to create reusable scripts'). It includes examples for each language.

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/realugbun/AgentExecMCP'

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