Skip to main content
Glama

Share a local port

share_port
Idempotent

Shares a local port over your tailnet via Tailscale Serve, defaulting to tailnet-only access; set public=true only to expose it to the open internet via Funnel when explicitly intended.

Instructions

Share a local port over the tailnet via Tailscale Serve (tailnet-only by default). WARNING: setting public=true switches to Funnel and exposes the port to the OPEN INTERNET — anyone with the URL can reach it. Only set public=true when internet exposure is explicitly intended. Funnel is DISABLED on this server: public=true returns FUNNEL_DISABLED unless the user sets TAILSCALE_MCP_ALLOW_FUNNEL=1. Returns the resulting URL(s).

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": "share_port"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoHTTPS mount path on the serve endpoint, e.g. "/api" (default: "/")
portYesLocal port to share
publicNoExpose to the open internet via Funnel (default: false = tailnet-only Serve). DANGEROUS: public=true makes the port reachable by anyone on the internet. Disabled unless TAILSCALE_MCP_ALLOW_FUNNEL=1.

Output Schema

NameRequiredDescriptionDefault
portYes
urlsYes
scopeYes
publicYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / path / description
      Previous value: -"HTTPS mount path on the serve endpoint (default: \"/\")"New value: +"HTTPS mount path on the serve endpoint, e.g. \"/api\" (default: \"/\")"
    • addedInput schema / properties / path / pattern
      Added value: +"^\\/[A-Za-z0-9._~\\-/]*$"
    • changedInput schema / properties / public / description
      Previous value: -"Expose to the open internet via Funnel (default: false = tailnet-only Serve). DANGEROUS: public=true makes the port reachable by anyone on the internet."New value: +"Expose to the open internet via Funnel (default: false = tailnet-only Serve). DANGEROUS: public=true makes the port reachable by anyone on the internet. Disabled unless TAILSCALE_MCP_ALLOW_FUNNEL=1."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "port": {
      +      "type": "number"
      +    },
      +    "public": {
      +      "type": "boolean"
      +    },
      +    "scope": {
      +      "type": "string"
      +    },
      +    "urls": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "port",
      +    "public",
      +    "scope",
      +    "urls"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior1/5

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

The annotations declare openWorldHint=false, but the description explicitly says public=true uses Funnel and exposes the port to the open internet. That is a direct contradiction in the safety/exposure profile, even though the rest of the warning is detailed.

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?

The description is compact and front-loads the key operational warning. Every sentence contributes to understanding exposure, restrictions, or return behavior.

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?

With an output schema present, the description need not explain return values, and it does cover the critical Funnel error path and default behavior. It is slightly incomplete on permissions and sibling-tool selection.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are already fully documented. The description reinforces the public flag's danger and Funnel restriction but adds no new syntax or semantic detail beyond the schema.

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 states a specific verb and resource: share a local port over the tailnet via Tailscale Serve. It also clarifies the default exposure level, which distinguishes this from a generic port-forwarding operation.

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?

It clearly explains the default tailnet-only behavior and when public=true is appropriate, including the explicit warning and server-side Funnel restriction. It does not mention sibling tools such as share_status or stop_share, so alternative routing is left implicit.

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