appcrane_push_to_managed_app
Push multiple files to a managed app's repository using server-side authentication. Supports inline content and staged uploads for large files, creating a single commit.
Instructions
Push a batch of files to a managed app's AMC_ repo, authenticated server-side via AppCrane's service-account credential. Use this — NOT github_push_files — for managed apps, because github_* tools authenticate with the caller's personal PAT, which has zero access to the service account's repos. Multiple files become a single commit. files: [{ path, content, encoding? }] where encoding defaults to "utf-8" (use "base64" for binaries like icons). Requires the app to already exist via appcrane_create_managed_app. v2.7.22: response now includes per-file sha256 (hex) and decoded bytes length so you can verify integrity — compute the SHA-256 of the bytes you sent, compare to the server's echo, and fail loudly if they differ. Essential for binary files where inline-string truncation or trailing-byte issues would otherwise produce a silently-broken commit. v2.10.7: for a large CODE file, do NOT inline it — upload the bytes over HTTP and commit by token. (1) curl -F file=@big.js -H "X-API-Key: <your dhk_mcp_ key>" https://<host>/api/files/staged returns { token, sha256, size_bytes }. (2) Pass that file as { path, staged_token } instead of { path, content }. The server reads the staged bytes and commits them verbatim, so 100+ KB sources push reliably without the model having to emit the content (which is where inline truncation comes from). Per file, provide exactly one of content or staged_token. Staged tokens are owner-scoped and expiring.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Managed app slug. Repo name resolved as AMC_<slug>. | |
| files | Yes | ||
| branch | No | Target branch. Defaults to the repo's default branch (usually "main"). | |
| message | No | Commit message. Defaults to "chore: scaffolding for <slug>". |