Add a firewall rule
add_firewall_ruleOpen a port or a range on every machine in this environment, from anywhere or only from the addresses you list. Only workspace owners and admins can change the firewall. Applies to running machines within about a minute. Prefer listing your own addresses over anywhere for anything that is not meant to be public. A web app served over HTTPS through create_instance_link needs no firewall rule.
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": {
"ports": "<ports>",
"sources": "<sources>"
},
"name": "add_firewall_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ports | Yes | A port like "8080" or a range like "8000-8100" | |
| sources | Yes | Who may connect: ["anywhere"], or IP addresses and CIDR ranges, IPv4 or IPv6 (e.g. ["203.0.113.7", "198.51.100.0/24"]). A single address means just that address. | |
| protocol | No | tcp (default) or udp | |
| workspace | No | Workspace ID (optional: defaults to the authenticated workspace) | |
| description | No | What the rule is for, up to 100 characters | |
| environment | No | Environment name (optional: defaults to the environment this session acts in) |