Use the Partner API when you need to replace a saved source file directly. Back up the original first and avoid writing while the builder is editing the same file.
Read the current files
With a key that permits apps:read, call GET /api/v1/managed_apps/APP_ID/files. The response contains a files array with each file's path, content, size and updated_at.
Discover the request format
Call GET /api/v1/mcp/tools with your credential to see each REST tool's inputSchema
and whether it needs an app_id. The schema describes the inputs inside params;
tool and app_id stay at the top level. The response includes an example.
arguments is accepted as an alias for params. Send one object. If both are
present and disagree, the request is refused before the tool runs. Missing-field
errors name the field and where to put it.
Replace one file
Send POST /api/v1/mcp/execute_tool with your API key in the Authorization: Bearer YOUR_KEY header and Content-Type: application/json:
{
"app_id": "APP_ID",
"tool": "overskill-write-file",
"params": {
"path": "src/example.ts",
"content": "// the complete replacement file\n"
}
}
The key must permit apps:write. A successful response is HTTP 200 with success: true, the saved path, byte size, a message and preview URL. Check success, not just the HTTP status.
The write saves that file and queues a preview rebuild. It does not create an app version or publish the live app. Reading and writing files does not itself run a billed builder turn.
Verify before continuing
Read the file again and compare its content with what you intended to save. A timeout or server error does not prove that nothing was saved: persistence can succeed before a later preview step fails.
This endpoint does not provide conditional updates with an ETag or a multi-file transaction. Coordinate your own edits so you do not overwrite another writer. Check Preview after all related files are saved, then publish separately.
Server code and generated agent instructions
Writing server/manifest.json does not install custom endpoints or scheduled tasks. Use the builder's supported endpoint tools for that work and verify the resulting endpoint in the target environment before publishing.
Some apps have generated AGENTS.md, CLAUDE.md and skill instructions when the app-manifest feature is enabled for their workspace. Those files are derived from app configuration; they are not guaranteed to exist in every app. Read the actual app's generated instructions when available rather than assuming an export describes the current live deployment.
Do not infer a CPU limit, transaction guarantee, outbound-request allowance or secret-management API from the source-file endpoint. See Building reliable custom server actions for request safety and testing boundaries.