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 when the work 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, which Valet sets. Node, Python, and Go are supported. Apply the governance skill before calling.

title and description are required with files and a call missing either is refused: Valet writes the app's valet.yaml from them, and any valet.yaml in files is replaced. Content is text: source files, lockfiles, Procfile, configuration. Images and other binary assets are not supported in files. Dependencies are installed during the build from the manifest you publish: package.json, with a lockfile only as the dependencies skill says; requirements.txt; or go.mod, where go.sum is optional and the build completes it. Do not include installed packages.

Send the app one of two ways. files carries the source in the call, which works from any client. push: {id, commit} publishes a commit you pushed with git: call create_push, run the recipe it returns, then pass the push_id and the commit sha it prints. Use push when you can run git with network access, when the app is large or holds binary files, or when you changed a clone of its source; the app's own valet.yaml and Procfile come from the commit. Pass files or push, not both.

Publishing changes an app that exists: create it first with create_service (kind: app), then publish to its name. A name that holds no app is refused. Publishing replaces the app's source with these files, so read get_source first when the app is not yours. The publish returns a build id. Poll get_build every ten to fifteen seconds until deploy_state is up, crashed, or refused, and between polls tell the person what its phase says the build is doing, such as running npm install or starting the app's processes; checking means the release waits for the organization's release policies. The first deploy can take a few minutes. A build that succeeded is not yet live: its processes still have to start on the new release. On crashed, a web process that had a running release keeps serving it, so a working URL does not prove the new release is live; other crashed processes are down until fixed. Read each crashed process's state_reason: if it is the app's own output, fix the code and publish again; if it names a platform or configuration failure, fix that or publish again. Set environment variables and attach resources once the app exists. set_env_vars restarts the app with its new variables. attach_resource takes the app's own variables too and applies them and the resource's in one restart, so an app that needs both gets them in one attach_resource call. Write the app to start without them and serve a page saying what is missing, never exiting, and give the user the URL once its resources are attached. 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.

Input Schema

NameRequiredDescriptionDefault
nameYesRequired. 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.
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. Pass files or push, not both; every other argument keeps its meaning.
filesNoRequired unless push is given. The app's files, [{path, content}]. A Procfile at the root is required.
titleNoRequired with files. What the app is called, written for a person.
org_nameNoThe Valet organization to publish into. Omit to use the organization the account joined first.
descriptionNoRequired with files. One sentence saying what the app does.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. 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."
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: publishing replaces the app's source, regenerates valet.yaml, returns a build id, and requires polling get_build until deploy_state is up, crashed, or refused. It also explains crash behavior, release delay, privacy defaults, and access control, and it is consistent with the destructive and non-read-only 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 front-loaded with purpose and is generally dense with useful operational detail rather than filler. However, it is very long for a tool description and could be easier to scan with clearer sectioning, even though most sentences carry real behavior or workflow guidance.

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?

Given the tool's complexity, eight parameters, nested objects, and no output schema, the description is complete enough to guide correct invocation. It covers prerequisites, source submission modes, build polling, crash handling, environment/resource follow-up, privacy, and authentication requirements.

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

Parameters5/5

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

Even though schema coverage is 100%, the description adds important meaning: files and push are alternatives, push requires the create_push id and commit sha, title and description are required with files, discard_draft is not used with push, and idempotency_key changes repeat-call behavior. It also clarifies content constraints such as text-only files and dependency manifests.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource: publishing source as an app that Valet builds and runs behind its own URL. It also explains the app use case as needing a server, background process, or database. It does not explicitly contrast itself with sibling publish tools such as publish_site, publish_agent, or publish_skill, so sibling differentiation relies on the word 'app' and the use-case condition.

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 explicitly says when to use this tool, requires creating the app first with create_service, and gives concrete conditions for choosing files versus push. It also states that files and push are mutually exclusive and supplies the follow-up workflow for polling builds and attaching resources.

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