Skip to main content
Glama

Serve file / dir / port -> public link

serve
Idempotent

Publish a local file, directory, or running dev server to a public HTTPS URL. Choose remote residency to keep the link live after your machine shuts down.

Instructions

Publish a local resource to a public HTTPS URL. Pass path to serve a file or directory (auto-hosted, no separate server needed), or port to expose an already-running dev server. Set residency to "remote" to publish the path to serve's storage so the URL works with the machine off. Do NOT start your own static file server; pass exactly one of path or port. Returns the public url, label, and residency, with label_kind and status for live links (or version, size_bytes, and kind for remote publishes); served_path and protection fields appear when set; usage comes along as context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttlNoOptional duration for the link protection (e.g. 24h, 3d, 7d).
nameNoOptional requested subdomain; an existing local link is reused if omitted.
pathNoLocal file or directory to serve via an auto-hosted static server (mutually exclusive with port).
portNoLocal port of an already-running server to expose (mutually exclusive with path).
protectNoOptional boolean; if true, enables capability token and secret code protection on the link.
replaceNoWhen residency is remote and a published artifact occupies the requested name, true replaces the existing published artifact at that name (Pro); false returns a residency_conflict you must resolve with the user.
residencyNoResidency of the served link. "local" (default) serves from the agent's machine (a tunnel); "remote" publishes the path to serve's storage so the URL stays live with the machine off.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
urlYes
kindNo
portNo
labelYes
usageYes
statusNo
versionNo
protectedNo
residencyYes
share_urlNo
expires_atNo
label_kindNo
size_bytesNo
served_pathNo
recycled_fromNo
suffixed_fromNo
readable_secretNo
replaced_tunnelNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.8.8
    • changedInput schema / properties / replace / description
      Previous value: -"When residency is remote and a published artifact occupies the requested name, true replaces it (deletes the old artifact); false returns a residency_conflict you must resolve with the user."New value: +"When residency is remote and a published artifact occupies the requested name, true replaces the existing published artifact at that name (Pro); false returns a residency_conflict you must resolve with the user."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "expires_at": {
      +      "type": "string"
      +    },
      +    "kind": {
      +      "type": "string"
      +    },
      +    "label": {
      +      "type": "string"
      +    },
      +    "label_kind": {
      +      "type": "string"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "port": {
      +      "type": "integer"
      +    },
      +    "protected": {
      +      "type": "boolean"
      +    },
      +    "readable_secret": {
      +      "type": "string"
      +    },
      +    "recycled_from": {
      +      "type": "string"
      +    },
      +    "replaced_tunnel": {
      +      "type": "boolean"
      +    },
      +    "residency": {
      +      "type": "string"
      +    },
      +    "served_path": {
      +      "type": "string"
      +    },
      +    "share_url": {
      +      "type": "string"
      +    },
      +    "size_bytes": {
      +      "type": "integer"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "suffixed_from": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    },
      +    "usage": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "links": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "owned": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "owned"
      +          ],
      +          "type": "object"
      +        },
      +        "plan": {
      +          "type": "string"
      +        },
      +        "publish": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "day_limit": {
      +              "type": "integer"
      +            },
      +            "day_used": {
      +              "type": "integer"
      +            },
      +            "hour_limit": {
      +              "type": "integer"
      +            },
      +            "hour_used": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "hour_used",
      +            "hour_limit",
      +            "day_used",
      +            "day_limit"
      +          ],
      +          "type": "object"
      +        },
      +        "storage": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "limit_bytes": {
      +              "type": "integer"
      +            },
      +            "used_bytes": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "used_bytes",
      +            "limit_bytes"
      +          ],
      +          "type": "object"
      +        },
      +        "transfer": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "limit_bytes": {
      +              "type": "integer"
      +            },
      +            "reset_at": {
      +              "type": "string"
      +            },
      +            "used_bytes": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "used_bytes",
      +            "limit_bytes"
      +          ],
      +          "type": "object"
      +        },
      +        "tunnels": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "live": {
      +              "type": "integer"
      +            },
      +            "max": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "live",
      +            "max"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "plan",
      +        "links",
      +        "tunnels"
      +      ],
      +      "type": "object"
      +    },
      +    "version": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "url",
      +    "label",
      +    "residency",
      +    "usage"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.8.6

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish non-read-only and non-destructive behavior, but the description adds substantial behavioral context: auto-hosted serving, remote storage persistence, replace and conflict semantics, and protection token behavior. It also explains response-shape variations without contradicting the schema or annotations.

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

Conciseness4/5

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

The description is information-dense but organized: purpose first, then mode selection, then safety constraints, then response behavior. A few return-field details are redundant with the output schema, but the text remains front-loaded and economical given the tool's complexity.

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?

For a tool with seven optional parameters, the description covers all key decision axes: path vs port, local vs remote residency, protection, replacement conflicts, and the caution against starting a separate static server. With an output schema present, nothing essential for correctly invoking the tool is missing.

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 the baseline is 3. The description enriches the schema by explaining that path implies auto-hosting, port implies a pre-existing server, and remote residency publishes to serve's storage. It also clarifies replace's conflict behavior, which adds real meaning beyond the property names.

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 opening sentence clearly states a specific verb and resource: publish a local resource to a public HTTPS URL. It further distinguishes the three target modes (file, directory, port) and the expected output, so an agent can tell this apart from sibling tunnel-management tools.

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?

The description gives concrete selection rules: pass path for a file/directory, port for an already-running dev server, and residency 'remote' for persistence with the machine off. It also includes a strong when-not instruction: 'Do NOT start your own static file server; pass exactly one of path or port.' It stops short of naming sibling tools as alternatives, so it misses the top bar for 5.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/servelink-swyftlabs/serve-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server