MCPcopy Create free account
hub / github.com/ZihaoFU245/lmstudio-toolpack / run_python

Function run_python

MCPs/python-sandbox.py:137–206  ·  view source on GitHub ↗

Execute a short Python snippet in a restricted subprocess. - Reduced builtins only, no imports. - Captures stdout/stderr. - If single expression, returns its value. - Otherwise, assign to `result` in code. - Appends an audit record for each execution. This is not a secure s

(
    code: str, inputs: Optional[Dict[str, Any]] = None, timeout_seconds: float = 5.0
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

_append_execution_logFunction · 0.85

Tested by

no test coverage detected