MCP tools

The MCP tool that installs a Project's latest Simulator build, or an app from an HTTPS download, on the Team's Simulator.

simulator_install_app puts an app on the Team’s running Simulator, in one of two ways:

  • From a Project (projectId): installs the Project’s latest Simulator build, the app an Agent last built for it, and launches it. Some Projects launch another app after installing (the app that hosts an extension) or none. With no build yet, ask an Agent in the Project’s channel to build it first (send_message).
  • From a download (url): installs an .ipa, or a .tar / .tar.gz holding a .app (name the .app with bundlePath). The link must be HTTPS and must not redirect, and you give its exact size in sizeBytes. An app installed this way is not launched: open it with simulator_launch_app.

The call waits until the install has finished, reporting progress to clients that ask for it. Installing an app that is already there replaces it. It deletes nothing else on the device.

Read-only Destructive Idempotent
No No No

Inputs

Give exactly one of projectId and url.

Input Type Required Default What it does
teamId string (UUID) Yes — The Team, from list_teams
simulator string No The Team’s default device Which device, by id from list_simulators
projectId string (UUID) One of the two — A Project, from list_projects: installs its latest Simulator build
url string One of the two — An https:// link to an .ipa, .tar or .tar.gz. The file name at the end of the link decides which
sizeBytes integer, at least 1 With url — The download’s exact size in bytes; a different size fails the install
bundlePath string With a .tar or .tar.gz url — The path of the .app (or .xcarchive) inside the archive, e.g. Build/Notes.app
launch boolean No true false installs a Project’s build without launching it. Has no effect with url

Result

Field What
installed true
bundleId The bundle id of the installed app as the Simulator reports it; for a Project, the app it launches when the Simulator does not say; otherwise null
launched Whether an app was launched after installing
{ "installed": true, "bundleId": "com.example.notes", "launched": true }

Errors

Message When What to do
Give exactly one of projectId or url. Both or neither were given Send one
url must be an HTTPS link. url does not start with https:// Use an HTTPS link
sizeBytes is required with url: the download’s exact size. url without sizeBytes Add the size in bytes
This Project’s latest build can no longer be downloaded. Ask an Agent to build it again. The latest build expired Ask an Agent to build the Project again
AirBuild answered 404. Try again in a moment. The Project has no Simulator build yet Ask an Agent to build the Project, then try again
bundlePath is required for archive downloads A .tar or .tar.gz url without bundlePath Add bundlePath
bundlePath must point at an .app or .xcarchive bundle inside the archive bundlePath does not end in .app or .xcarchive Point it at the .app
uploaded app must end in .app, .ipa, .apk, or .xcarchive The link’s file name is not an .ipa or an archive Link the .ipa or a .tar / .tar.gz
The install failed: reason. The download or the install failed, e.g. downloaded 10 bytes, expected 12 when sizeBytes is wrong Fix what the reason says, then try again
The install did not finish: try again. The install did not finish in time Call it again

Plus the errors every Simulator tool can return: see start_simulator.

Example

{"name": "simulator_install_app", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "projectId": "00000000-0000-0000-0000-000000000000"}}