Get hosted app source
get_app_sourceRead the files of a hosted app as Playbook stores them. Without path, returns the version's version_number and its files, each with path and bytes. With path, also returns that file's text in file.content, a slice starting at offset; while file.next_offset is not null, call again with offset set to it to read the rest. Reads the live version unless version names an older one (see list_app_versions); a version or path that is not there answers not found. Read an app's files before changing it with edit_app_source rather than rewriting them from memory. 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.
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>"
},
"name": "get_app_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | A file to read, e.g. `app.js`, as listed in `files` | |
| slug | Yes | Slug of the app, from list_apps | |
| limit | No | Characters to return, up to 50,000 (default 12,000) | |
| offset | No | Where in the file to start, in characters: the previous answer's `file.next_offset` | |
| version | No | Version number to read; omit for the live version | |
| 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. |