Skip to main content
Glama

Get public URL of a port

get_public_url
Read-only

Get an HTTPS URL for a TCP port in the sandbox, e.g. a web app or API you started there. The app must listen on 0.0.0.0 (not only 127.0.0.1) and keep running – start it in the background, e.g. nohup python3 -m http.server 8000 >/tmp/srv.log 2>&1 &. The URL is protected by a token: open url_with_token in a browser (the token moves to a cookie), or send the X-WBX-Token header. Anyone with the token can use the app until the sandbox ends. WebSockets work.

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": {
      "port": "<port>"
    },
    "name": "get_public_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYesTCP port in the sandbox (1–65535)
sandbox_idNoSandbox ID (sb_…). If omitted, the current sandbox of this session is used. A sandbox_id you pass becomes the current sandbox for later calls without sandbox_id.

Output Schema

NameRequiredDescriptionDefault
urlYesHTTPS URL; needs the X-WBX-Token header.
portYesTCP port in the sandbox.
tokenYesAccess token for the URL.
sandbox_idYesSandbox ID.
url_with_tokenYesHTTPS URL to open in a browser (the token moves to a cookie).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sandbox_id / description
      Previous value: -"Sandbox ID (sb_…). If omitted, the current sandbox of this session is used."New value: +"Sandbox ID (sb_…). If omitted, the current sandbox of this session is used. A sandbox_id you pass becomes the current sandbox for later calls without sandbox_id."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnly/non-destructive; the description adds the security model the agent cannot infer: the URL is token-protected, the token can be delivered via url_with_token (moved to a cookie) or the X-WBX-Token header, anyone holding the token has access until the sandbox ends, and WebSockets are supported. That is exactly the behavioral context beyond structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, then precondition, then auth mechanism, then lifetime caveat. Every sentence carries distinct information; the inline command example is compact and directly actionable rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return-value shape need not be described, and the auth/lifetime/WebSocket details make the tool safe to call. Minor gaps remain: no URL format hint (e.g. https://<port>-<sandbox>.host) and no statement of behavior when nothing is listening on the port.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning for the port parameter by constraining how the service must be bound (0.0.0.0, still running), which affects whether the call is meaningful. It says nothing about sandbox_id, though the schema already documents that side effect fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource — 'Get an HTTPS URL for a TCP port in the sandbox' — plus a concrete use case ('a web app or API you started there'). No sibling tool in the catalog exposes network URLs, so the agent can distinguish this from list_files/run_command without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage preconditions are stated concretely: the app must listen on 0.0.0.0 rather than 127.0.0.1 and must keep running, with a worked background-start example. It stops short of explicit when-not guidance (e.g. what happens if nothing is listening), but the trigger condition is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources