Skip to main content
Glama

Serve file / directory -> public link

serve_file
Idempotent

Host a local file or directory and share it via a public HTTPS URL. Serve documents, images, or artifacts; remote publishing keeps the link active when the machine is off.

Instructions

Serve a local file or directory and get a public shareable URL. Pass the file or directory path to path to have it auto-hosted and tunneled. Use this when the user asks to share/serve a file, markdown document, image, or artifact. Set residency to "remote" to publish to serve's storage so the URL works with the machine off. Do not start your own static server. To expose an already-running dev server by port instead, use the serve tool.

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.
pathYesLocal file or directory to serve via an auto-hosted static server.
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.3/5.0
Behavior4/5

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

The description adds useful behavioral context beyond the annotations: it explains the file is 'auto-hosted and tunneled,' and that remote residency publishes to serve's storage so the URL works with the machine off. This complements the idempotentHint and destructiveHint annotations without contradicting them.

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 well-structured and front-loaded with the core purpose, then adds usage guidance and the key alternative. It is slightly redundant—'Pass the file or directory path to path to have it auto-hosted and tunneled' largely repeats the opening—but overall it is concise and scannable.

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?

For a tool with 6 parameters, an output schema, and several related siblings, the description covers the core use case, the key residency distinction, and the most important alternative tool. It does not enumerate every parameter or output detail, but the schema and output schema already cover those.

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 coverage is 100%, so the baseline is 3. The description adds some high-level meaning for 'path' and 'residency' but mostly restates what the schema already says; it does not add detail for ttl, name, protect, or replace beyond their schema descriptions.

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: 'Serve a local file or directory and get a public shareable URL.' It clearly distinguishes itself from the sibling 'serve' tool by stating that the sibling handles already-running dev servers by port.

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?

The description gives explicit when-to-use guidance: 'Use this when the user asks to share/serve a file, markdown document, image, or artifact.' It also provides a concrete alternative: 'To expose an already-running dev server by port instead, use the serve tool.' It even warns against starting a separate static server.

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