Check source before deploying
detect_sourceDry run for deploy_source: pass the same files and learn what the platform detects (stack, how it builds, static site or server, suggested release command and services) and whether it is ready to deploy, needs a check, or is blocked and why. It also gives the estimated monthly cost, and the volume the app needs to keep its data with its price. Stores nothing and starts no 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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "detect_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| 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. |