Skip to main content
Glama

Publish an app

publish_app
Destructive

Publish source as an app: a process Valet builds from your files and runs behind its own URL. Use it for an app that needs a server, a background process, or a database. A Procfile at the root says how to start each process type; the web type serves the app's URL and must listen on $PORT. Node, Python, and Go are supported. Read the organization's requirements with get_skill governance before calling. A policy set to block refuses a publish that fails it, and the answer names what to fix; a monitor policy only records findings, which get_evaluation lists.

With files, Valet writes the app's valet.yaml from title and description. Send source, the Procfile, configuration, and a manifest the build installs from (package.json, requirements.txt, or go.mod) as text, never installed packages. When you can run git with network access, or the app is large or holds binary files, call create_push, push, and pass push instead; the commit supplies its own valet.yaml.

Create the app first with create_service (kind: app), then publish to its name. Publishing replaces the app's source, so read get_source first when the app is not yours. Returns the app's URL and a build id, or no_changes and no build when the files or pushed tree are already running. Poll get_build every ten to fifteen seconds until deploy_state is up, idle (deployed, asleep), crashed, superseded, or refused. A crashed release leaves the last one serving, so a working URL does not prove the new release is live.

Write the app to start without its variables and resources and serve a page saying what is missing, never exiting. Then attach_resource, which takes the app's own variables too, applies both in one restart; set_env_vars restarts a running app for plain variables and again for secrets. A new app is private: only members of the organization that owns it can open it, after signing in to Valet. Use set_service_access to make it public or password-protected. Requires connecting a Valet account.

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

Input Schema

NameRequiredDescriptionDefault
nameYesThe app's name, which is the first label of its URL. The app must exist: create it first with create_service. Publishing to it replaces its source.
pushNoPublish a Git push instead of files: the id create_push returned and the commit you pushed to its branch. Use it when you can run git with network access, because it sends only what changed. Every other argument keeps its meaning.
filesNoThe app's source sent in the call: a Procfile at the root and the files it starts. For a Git push, pass push instead.
titleNoWhat the app is called, written for a person. It labels the app wherever it is listed.
org_nameNoThe Valet organization to publish into. Omit to use the organization the account joined first.
descriptionNoOne sentence saying what the app does, for a person deciding whether to open it.
discard_draftNoSet true to discard an open draft on this app that another session left. Omit to be told about it instead. Not used with push.
idempotency_keyNoAn opaque key of your choosing. Repeating a call with the same key returns the first call's result instead of starting a second build. Use a new key for new files: a repeated key returns the earlier result even when the files changed.

Output Schema

NameRequiredDescriptionDefault
orgYesName of the Valet organization the call acted in.
urlNoURL that serves the app. Absent while the app has no route.
nameYesName of the app. It is the first label of its URL.
build_idNoID of the build the publish started. Pass it to get_build and poll until deploy_state is up, idle, crashed, superseded, or refused. Absent when no build started.
no_changesNoTrue when the files or pushed tree are what the app already runs, so no build started. Absent otherwise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / no_changes / description
      Previous value: -"True when the pushed tree is what the app already runs, so no build started. Absent otherwise."New value: +"True when the files or pushed tree are what the app already runs, so no build started. Absent otherwise."
  2. Changed1 schema field changed
    • changedInput schema / properties / files / description
      Previous value: -"The app's files. Give this or push, not both. A Procfile at the root is required."New value: +"The app's source sent in the call: a Procfile at the root and the files it starts. For a Git push, pass push instead."
  3. Changed1 schema field changed
    • changedInput schema / properties / push / description
      Previous value: -"Publish a Git push instead of files: the id create_push returned and the commit you pushed to its branch. Use it when you can run git with network access, because it sends only what changed. Pass files or push, not both; every other argument keeps its meaning."New value: +"Publish a Git push instead of files: the id create_push returned and the commit you pushed to its branch. Use it when you can run git with network access, because it sends only what changed. Every other argument keeps its meaning."
  4. Changed1 schema field changed
    • changedOutput schema / properties / build_id / description
      Previous value: -"ID of the build the publish started. Pass it to get_build and poll until deploy_state is up, crashed, or refused. Absent when no build started."New value: +"ID of the build the publish started. Pass it to get_build and poll until deploy_state is up, idle, crashed, superseded, or refused. Absent when no build started."
  5. Changed3 schema fields changed
    • changedInput schema / properties / description / description
      Previous value: -"With files, a call without it is refused. One sentence saying what the app does, for a person deciding whether to open it."New value: +"One sentence saying what the app does, for a person deciding whether to open it."
    • changedInput schema / properties / files / items / properties / path / description
      Previous value: -"Path relative to the app root, with '/' separators and no leading slash. It may not contain '.' or '..' segments."New value: +"Path of the file relative to the app root, such as docs/guide.md."
    • changedInput schema / properties / title / description
      Previous value: -"With files, a call without it is refused. What the app is called, written for a person. It labels the app wherever it is listed."New value: +"What the app is called, written for a person. It labels the app wherever it is listed."
  6. Changed16 schema fields changed
    • changedInput schema / properties / description / description
      Previous value: -"Required with files. One sentence saying what the app does."New value: +"With files, a call without it is refused. One sentence saying what the app does, for a person deciding whether to open it."
    • changedInput schema / properties / files / description
      Previous value: -"Required unless push is given. The app's files, [{path, content}]. A Procfile at the root is required."New value: +"The app's files. Give this or push, not both. A Procfile at the root is required."
    • changedInput schema / properties / files / items / properties / content / description
      Previous value: -"Required. The file's complete text content."New value: +"The file's complete text content."
    • changedInput schema / properties / files / items / properties / path / description
      Previous value: -"Required. The file's path, relative to the app root."New value: +"Path relative to the app root, with '/' separators and no leading slash. It may not contain '.' or '..' segments."
    • changedInput schema / properties / name / description
      Previous value: -"Required. The app's name, which is the first label of its URL. The app must exist: create it first with create_service. Publishing to it replaces its source."New value: +"The app's name, which is the first label of its URL. The app must exist: create it first with create_service. Publishing to it replaces its source."
    • addedInput schema / properties / name / maxLength
      Added value: +63
    • addedInput schema / properties / name / minLength
      Added value: +3
    • addedInput schema / properties / name / pattern
      Added value: +"^[A-Za-z0-9][A-Za-z0-9-]{1,61}[A-Za-z0-9]$"
    • changedInput schema / properties / push / properties / commit / description
      Previous value: -"Required. The full sha of the commit you pushed to the push's branch. The recipe create_push returned prints it."New value: +"The full sha of the commit you pushed to the push's branch. The recipe create_push returned prints it."
    • changedInput schema / properties / push / properties / id / description
      Previous value: -"Required. The push_id create_push returned."New value: +"The push_id create_push returned."
    • changedInput schema / properties / title / description
      Previous value: -"Required with files. What the app is called, written for a person."New value: +"With files, a call without it is refused. What the app is called, written for a person. It labels the app wherever it is listed."
    • addedOutput schema / properties / build_id / description
      Added value: +"ID of the build the publish started. Pass it to get_build and poll until deploy_state is up, crashed, or refused. Absent when no build started."
    • addedOutput schema / properties / name / description
      Added value: +"Name of the app. It is the first label of its URL."
    • addedOutput schema / properties / no_changes / description
      Added value: +"True when the pushed tree is what the app already runs, so no build started. Absent otherwise."
    • addedOutput schema / properties / org / description
      Added value: +"Name of the Valet organization the call acted in."
    • addedOutput schema / properties / url / description
      Added value: +"URL that serves the app. Absent while the app has no route."
  7. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "build_id": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "no_changes": {
      +      "type": "boolean"
      +    },
      +    "org": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "org",
      +    "name"
      +  ],
      +  "type": "object"
      +}
  8. Changed7 schema fields changed
    • changedInput schema / properties / description / description
      Previous value: -"Required. One sentence saying what the app does."New value: +"Required with files. One sentence saying what the app does."
    • changedInput schema / properties / discard_draft / description
      Previous value: -"Set true to discard an open draft on this app that another session left. Omit to be told about it instead."New value: +"Set true to discard an open draft on this app that another session left. Omit to be told about it instead. Not used with push."
    • changedInput schema / properties / files / description
      Previous value: -"Required. The app's files, [{path, content}]. A Procfile at the root is required."New value: +"Required unless push is given. The app's files, [{path, content}]. A Procfile at the root is required."
    • changedInput schema / properties / name / description
      Previous value: -"Required. The app's name, which becomes the first label of its URL. Naming an app that exists republishes it."New value: +"Required. The app's name, which is the first label of its URL. The app must exist: create it first with create_service. Publishing to it replaces its source."
    • addedInput schema / properties / push
      Added value: +{
      +  "description": "Publish a Git push instead of files: the id create_push returned and the commit you pushed to its branch. Use it when you can run git with network access, because it sends only what changed. Pass files or push, not both; every other argument keeps its meaning.",
      +  "properties": {
      +    "commit": {
      +      "description": "Required. The full sha of the commit you pushed to the push's branch. The recipe create_push returned prints it.",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "Required. The push_id create_push returned.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "commit"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / title / description
      Previous value: -"Required. What the app is called, written for a person."New value: +"Required with files. What the app is called, written for a person."
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "files",
      -  "title",
      -  "description"
      -]New value: +[
      +  "name"
      +]
  9. Changed1 schema field changed
    • changedInput schema / properties / name / description
      Previous value: -"Required. The app's name, which becomes the last segment of its URL. Naming an app that exists republishes it."New value: +"Required. The app's name, which becomes the first label of its URL. Naming an app that exists republishes it."
  10. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, idempotentHint=false and readOnlyHint=false, but the description still adds real behavior: publishing replaces the app's source, a crashed release leaves the last one serving so a working URL is not proof, new apps are private to the organization, and set_service_access toggles public or password access. The build-state poll loop and the no_changes return are also disclosed, though the idempotency-key caveat lives mainly in the schema rather than the prose.

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?

Six dense paragraphs, front-loaded with purpose, then the governance gate, then the files-vs-push fork, then the build lifecycle. Nearly every sentence carries operational weight, but the advisory paragraph about writing the app to start without its variables and the closing note about connecting a Valet account are contextual extras that dilute focus slightly for a tool this long.

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?

Covers the full workflow for a destructive, open-world, multi-step publish: prerequisites, source-mode choice, replacement semantics, return shape (URL plus build id, or no_changes), and the poll-until-terminal-state loop. With an output schema present it need not spell out return values, and the one remaining soft spot is that failure modes beyond the policy refusal are only implied by the build states.

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 every parameter including the nested push id and commit is already documented, which sets the baseline at 3. The prose adds some cross-parameter meaning (files and push are alternatives, discard_draft has no effect with push, org_name defaults to the first-joined org), but most of that is already mirrored in the schema text, so it earns little above baseline.

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 and defines what is being built: 'Publish source as an app: a process Valet builds from your files and runs behind its own URL.' It also scopes it away from the sibling publish_* tools by naming the exact need (a server, a background process, or a database), so an agent can route 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 splits two modes and the condition that selects each: send text files directly, or call create_push and pass push when git with network access is available, or when the app is large or holds binary files. It also gives ordering prerequisites (get_skill governance first, create_service kind: app before publishing, get_source when the app is not yours) and names where monitor-only findings surface (get_evaluation).

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