

Secure Python Code Sandbox
Compute
Details
For safely executing arbitrary Python code snippets within an isolated, secure environment. The sandbox comes pre-installed with common data science and web request libraries, including requests, NumPy, and pandas. It is ideal for performing quick computations, data transformations, or dynamic API calls without requiring external infrastructure.
Use Cases
Dynamic Code Execution, Data Manipulation, On-the-fly Calculation, API Integration, Data Analysis, Custom Scripting, Algorithmic Tasks, Web Scraping
Parameters
2 parameters(required listed first)view allcollapse
coderequiredstringA string containing the Python code to be executed. The code must be self-contained. Constraints: Maximum of 50,000 characters. Example: "import numpy as np\ndata = np.array([1, 2, 3, 4, 5])\nmean = np.mean(data)\nprint(\"The mean is {}\".format(mean))"
timeout_secondsnumberThe maximum number of seconds to allow the code to run before terminating the execution. Default: 60 Constraints: Must be an integer between 10 and 60.
Range: 10 - 60
Frequently Asked Questions
How do I connect this tool to an external agent?
You can install the local MCP server by opening a terminal and running:
Install commands
npm install -g @agentpmt/mcp-router
agentpmt-setupThis will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.
Alternatively you can connect to the hosted version with this config block, no installation required:
Hosted MCP config
{
"mcpServers": {
"agentpmt": {
"type": "streamable-http",
"url": "https://api.agentpmt.com/mcp",
"headers": {
"Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
"x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
}
}
}
}View MCP Connection Instructions for more details.
How does an external agent use this tool?
After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:
Agent prompt
Call the AgentPMT-Tool-Search-and-Execution tool with action 'get_schema' and tool_id 689f48d98ee2d1dd79e9035e ("Secure Python Code Sandbox"). Then call the same tool with action 'call_tool', tool_id 689f48d98ee2d1dd79e9035e, and the parameters needed for my request.
The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.





