Get Free Port
get_free_portFind an available port for your application by checking OS-level and registry availability. Optionally tests a preferred port, otherwise returns a free port from 1024-49151.
Instructions
Find and return an available port. Checks both the registry and OS-level availability.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_free_port"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preferred_port | No | Optional specific port to check. If not provided or unavailable, searches for any free port in range 1024-49151. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||