Sandboxing MCP tools means running the actual execution of a tool call inside an isolated environment, one with its own constrained file system, network access, and resource limits, so that even if a call turns out to be malicious or badly manipulated, the damage stays contained to that boundary. This matters most for tools that execute code, run shell commands, or process untrusted files, where the tool's job inherently involves doing something powerful with input that ultimately traces back to a model's decision. A sandbox doesn't prevent a bad call from happening. It limits what a bad call can actually reach once it does.
Isolate execution, not just access
Authentication and authorization decide whether a call should happen. Sandboxing is a separate layer that limits what happens if a call that should have been blocked gets through anyway, or if a call that looked legitimate turns out to have unexpected side effects. Running tool execution inside a container, a restricted virtual machine, or an equivalent isolated environment means a flaw in one layer doesn't automatically become a flaw in every layer.
Restrict network access from inside the sandbox
A sandboxed tool that can still make arbitrary outbound network calls has only been partially contained. Restrict network access to the specific destinations a given tool actually needs, and block everything else by default, so a compromised or manipulated tool call can't use the sandbox itself as a launching point for exfiltration or further attacks against other systems.
Set resource limits deliberately
CPU, memory, disk, and execution time limits on sandboxed tool runs prevent a runaway or intentionally abusive call from consuming resources far beyond what a legitimate call would need. This also catches a category of failure that has nothing to do with malice: a tool stuck in a loop or processing an unexpectedly large input can degrade the whole system for everyone else if nothing bounds it.
Don't let the sandbox share credentials with the host
A sandboxed environment that still has access to the host's full credential set has a hole in its isolation that undermines the rest of the setup. Provision credentials specifically for the sandbox, scoped to what that specific tool run needs, so a compromise inside the sandbox doesn't automatically hand over the same access the host itself holds.
Tear down and rebuild sandboxes rather than reusing them indefinitely
A sandbox that persists across many tool calls without being refreshed can accumulate state, cached files, or leftover artifacts from previous calls that shouldn't carry forward. Prefer short-lived, disposable sandbox instances that get rebuilt regularly, so each tool call starts from a known clean state rather than inheriting whatever the last call left behind.
Know what sandboxing doesn't protect against
A sandbox contains what a tool can reach on the system it's running on. It does nothing to stop a tool call from being unauthorized in the first place, and it does nothing to stop sensitive data from being read, processed, and returned to the model within the sandbox before anything gets contained. Teams sometimes treat sandboxing as a general-purpose safety net once it's in place, when it's really a narrow containment measure for one specific category of risk: what happens if execution itself goes wrong.
Match sandbox strength to the tool's actual risk
Not every tool needs the heaviest isolation available. A tool that formats text has a very different risk profile from one that executes arbitrary code a model generated, and applying the same maximal sandboxing everywhere can slow development without adding meaningful protection where the risk was already low. Reserve the strictest isolation, tightest network restrictions, and shortest-lived instances for tools that actually execute code, process untrusted files, or touch external systems directly.
Where TELEON fits
TELEON's policy enforcement at the tool-call boundary complements sandboxing by deciding whether a call should be allowed to reach the tool execution environment at all, while sandboxing limits the consequences of calls that do get through, including ones that later turn out to have been manipulated in ways policy didn't catch.
The actual sandbox infrastructure, containers, isolated runtimes, network policy inside that isolation, is infrastructure work each team builds and operates for its own tool execution environment.
A short checklist
- Run tool execution, especially code and file processing tools, inside an isolated environment.
- Restrict outbound network access from the sandbox to a defined allow list.
- Set CPU, memory, disk, and time limits on every sandboxed tool run.
- Provision sandbox credentials separately from host credentials, scoped narrowly.
- Rebuild sandbox instances regularly instead of reusing them indefinitely.
- Monitor sandbox resource usage for spikes that suggest abuse or a stuck process.
- Test sandbox escape scenarios deliberately rather than assuming isolation holds.
Sandboxing is a containment control, not a prevention control, and it's worth being clear about that distinction internally so nobody mistakes it for a substitute for authorization and validation. Its value shows up specifically in the cases where every other control already failed, which is exactly the scenario worth planning for rather than hoping never happens.
