Discriminant: always 'sandbox' for sandboxed specs.
The full source code of the sandboxed module.
Must export or define an async run function as its entry point.
async function run(input) {
const res = await fetch(`https://api.example.com?q=${input.query}`);
return res.json();
}
Explicit allowlist of sandbox APIs the code may invoke. Any call to an API not in this list will throw at runtime.
Implementation specification for a tool whose logic is arbitrary code executed in a memory/time-bounded sandbox.
The sandboxed function signature must be:
The engine calls
run(input)and returns its resolved value as the tool output.