Deploy source files
deploy_sourceDeploys an app from source files passed in this call: use it for a small app that exists in the conversation. A new name creates the app; an existing app gets a new build. Waits briefly and returns the live URL, or the build id to pass to wait_for_build. What deploys: a server that listens on the PORT environment variable on all interfaces (0.0.0.0); or a static site, which is files in a publish directory with an index.html; a Dockerfile at the root decides the build when there is one. Files an app writes to its own disk are lost on every deploy and restart. Data to keep goes on a volume: the volume argument on a deploy, or add_volume for a deployed app. For an app whose data is a SQLite file, call add_sqlite_database once the app is deployed: it keeps the file on a volume and backs it up. A volume costs money, so give the user its price and ask first. At most 500 files and 1 MiB in total; never node_modules, .git or build output. To deploy a Claude artifact: an HTML artifact goes in files as index.html; a React artifact goes in react_component unchanged, as one string (do not rewrite it as a project: the platform builds the project around it); an SVG, Markdown or Mermaid artifact is written as an index.html first. For a project on the user's disk, or anything larger, use create_source_upload (when you can run commands) or the nimbus CLI. Files and variables travel through the conversation. Creates or changes a running app: confirm with the user first.
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": "deploy_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Non-secret variables for the app (NODE_ENV and the like). Secrets are refused here: set them with set_env and secret: true, or in the console. | |
| name | Yes | The app's name: lowercase letters, digits and hyphens. A new name creates the app; an existing app of this organization gets a new build. | |
| wait | No | Wait up to 25 seconds for the outcome (default true). false returns as soon as the build starts. | |
| files | No | Text files: relative path (forward slashes) to the file's full content. | |
| title | No | With react_component: the page title shown in the browser tab. Defaults to the app's name. | |
| volume | No | Only for an app that must keep data it writes to disk, and only after the user agreed to its price (detect_source gives it): a volume created and mounted at mount_path before the app first starts. An app that already has a volume at that path keeps it. Not for a static site. Keep an app that writes a SQLite file at one instance. | |
| binary_files | No | Binary files such as images: relative path to the content in base64. Text files go in files. | |
| react_component | No | A React artifact, instead of files: the single component file's full source, unchanged, with the component as its default export. The platform builds it with React, Tailwind, lucide-react, recharts and the shadcn/ui components under @/components/ui, and publishes a static site. Do not pass files as well. | |
| static_publish_dir | No | For a static site: the directory to publish (dist, public, ...). Leave it out to let the platform choose. |