AgentPMT
Secure Python Code Sandbox

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)
coderequiredstring

A 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_secondsnumber

The 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?

Install commands

npm install -g @agentpmt/mcp-router
agentpmt-setup

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\"}"
      }
    }
  }
}

How does an external agent use this tool?

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.

Looking for help integrating AI into your business? Set up a free consultation.

Secure Python Code Sandbox by Apoth3osis | AgentPMT