Create or verify an isolated Docker sandbox for the workspace. Optionally apply a container template and network policy. Idempotent — returns existing sandbox info if already created.
AI agents invoke sandbox_prepare to trigger actions in MedSci Agent. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
This tool provisions and configures a Docker container environment, which constitutes executing external infrastructure operations. Creating sandboxes, applying container templates, and setting network policies are privileged system-level actions that can have significant security implications (e.g., network exposure, resource allocation, container escape risks).
From the tool's definition 'Create or verify an isolated Docker sandbox for the workspace. Optionally apply a container template and network policy.'
Documented attack patterns abuse exactly the kind of access sandbox_prepare gives an agent:
PolicyLayer is an MCP gateway — it sits between your AI agents and MedSci Agent, and nothing reaches the server without passing your rules. This is the rule we recommend for sandbox_prepare:
{
"version": "1",
"default": "deny",
"tools": {
"sandbox_prepare": {
"limits": [
{
"counter": "sandbox_prepare_rate",
"window": "minute",
"max": 10,
"scope": "grant"
}
]
}
}
} sandbox_prepare stays usable, but rate-capped — a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
Free to start. No card required.
Create or verify an isolated Docker sandbox for the workspace. Optionally apply a container template and network policy. Idempotent — returns existing sandbox info if already created. It is categorised as a Execute tool in the MedSci Agent MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the MedSci Agent MCP server in PolicyLayer and add a rule for sandbox_prepare: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches MedSci Agent. Nothing to install.
sandbox_prepare is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the sandbox_prepare rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for sandbox_prepare. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
sandbox_prepare is provided by the MedSci Agent MCP server (omar-a-hassan/medsci-agent). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Start from MedSci Agent, add the rest of your stack, and see everything your agents can call. Then put policy on all of it.
Free to start. No card required.
28 MedSci Agent tools catalogued and risk-classified — across an index of 43,000+ MCP servers.