Edit hosted app source
edit_app_sourceChange some files of a hosted app without resending the rest, and put the result live as a new version. files adds or replaces files by path, with their full contents as text; delete_files removes paths, and a path the app does not have is ignored without an error, so take paths from get_app_source. Every other file is kept as it is in expected_version. expected_version must be the app's live head_version_number, from list_apps or list_app_versions: if the app changed since, the call fails with stale_app and the live number, so read the files again and redo the change. The result must still meet deploy_app's limits: an index.html, text files only, at most 50 files and 1 MB. Like a deploy, the change makes the app read the board as you; if someone else deployed it last, signed-in visitors have to reload before their next change. The new files can take about a minute to be served. The previous version stays in the history (Playbook keeps the last 50), so revert_app can undo this. An app not deployed since Playbook began keeping versions has no stored files: the call fails with source_unavailable, and deploying its files once with deploy_app starts its history. Requires write scope and permission to edit the board the app shows.
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": {
"slug": "<slug>",
"expected_version": "<expected_version>"
},
"name": "edit_app_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Slug of the app, from list_apps | |
| files | No | Files to add or replace: full contents as text, keyed by path, e.g. { "app.js": "…" } | |
| comment | No | A note stored with the new version, shown by list_app_versions | |
| delete_files | No | Paths of files to remove | |
| organization | No | Workspace slug, as returned by list_organizations. Omit it when the account has a single workspace — it is then resolved from your token. Pass it only when the account has several, or when you mean a workspace other than the obvious one. | |
| expected_version | Yes | The app's live `head_version_number`, as you last read it |