Skip to main content
Glama

Expose sandbox port

sandbox_expose_port
DestructiveIdempotent

Expose a sandbox port as an HTTPS URL with token-based access, letting the user open a web app running inside a running sandbox. Use sandbox_unexpose_port to remove it.

Instructions

Give a port inside a running sandbox an HTTPS URL, e.g. to show the user a web app the sandbox runs (it must listen on 0.0.0.0). The port stays private: the returned url carries an access token, so a browser opens it once and then keeps a cookie; other clients send accessToken in the X-Lizard-Access-Token header. Anyone with the url or token can reach the port, so share it only with the user. Remove it with sandbox_unexpose_port.

Input Schema

NameRequiredDescriptionDefault
portYes
sandboxIdYesExact sandbox ID from sandbox_create or sandbox_list

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, openWorldHint=true) by explaining the security model: the URL carries an access token, browsers get a cookie, non-browser clients send X-Lizard-Access-Token, and anyone holding the URL or token can reach the port. The 'share it only with the user' warning aligns with and gives substance to the destructive and open-world hints.

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?

Front-loaded with the action and use case, then layered: prerequisite, token semantics, sharing warning, teardown pointer. Every sentence carries distinct operational information with no filler.

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

Completeness5/5

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

No output schema exists, yet the description explains what is returned (a URL plus accessToken) and how it is consumed. Combined with the precondition and the teardown sibling, an agent has everything needed to call this correctly and safely.

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?

With only 50% schema coverage (sandboxId is documented, port is not), the description partly compensates by stating the port must be listening on 0.0.0.0 – a real success precondition tied to the parameter. It doesn't explain anything further about port selection or reuse of an already-exposed port, so it stops short of fully covering the gap.

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?

States a specific verb and resource ('Give a port inside a running sandbox an HTTPS URL') and immediately clarifies the intent with a concrete use case (showing the user a web app). It also names the sibling tool that reverses the operation, so it is distinguishable from sandbox_unexpose_port without opening a schema.

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

Usage Guidelines5/5

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

Explicitly frames when to use it ('to show the user a web app the sandbox runs'), states the precondition that the process must listen on 0.0.0.0, and names the alternative for teardown (sandbox_unexpose_port). Nothing about routing is left to inference.

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