expose_port
Expose a localhost server to the internet with a public HTTPS URL, so anyone can open it in a browser until the sandbox is destroyed.
Instructions
Give a server running inside the sandbox a public https URL, so a person can open it in a browser. Use this after starting a web server or dev server in the background. The server only needs to listen on localhost. Returns a URL that works until the sandbox is destroyed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sandbox_id": "<sandbox_id>",
"port": "<port>"
},
"name": "expose_port"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | The port the server listens on, e.g. 3000. | |
| sandbox_id | Yes | The id returned by create_sandbox. |