checkApp
Validate a Sasha App you manage
Re-validate the whole package and report whether it is live, with file/line diagnostics when it is not. The result carries status: when status.ok is false the app is NOT usable until the listed diagnostics are fixed. Each names the package file, the line when known, the error code and a reason token. Fix the file and check again; the app is live as soon as it validates.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
app | string | required | The app id (lowercase kebab-case), as shown by open_app__<id> or listAppFiles. |
Scopes
apps:invoke, apps:write
Annotations
- Read only: yes
- Destructive: no
When to use
Call checkApp after you fix the diagnostics that a change reported, or when you want to know if an app is live now. It changes nothing.
The tool needs the same access as listAppFiles: the scopes apps:invoke and apps:write, an admin or staff user, and manage access on the app.
The result has status:
status.okistruewhen the package validates. The app is live atstatus.revision.- When
status.okisfalse, the app cannot be used until you fix each entry instatus.diagnostics. Each entry hasfile(a package path),linewhen it is known,codeandreason.status.revisioncan benull. - A diagnostic with
reasonmigration_already_applied_here:…means that a migration this instance already applied was changed. Put the old text back, and add a newmigrations/NNN-*.sqlfile for the change.
The text part of the result is one sentence when the app validates, or one line per problem in the form <file>:<line> <code> <reason>.
Example
{ "app": "timesheet" }
The structured result (structuredContent) for a package with a mistake in APP.md:
{
"app": "timesheet",
"status": {
"ok": false,
"revision": null,
"diagnostics": [
{ "file": "APP.md", "code": "APP_MANIFEST_INVALID", "reason": "unknown_field:colour" }
]
}
}
The text part of the result:
App does NOT validate yet (1 problem):
- APP.md APP_MANIFEST_INVALID unknown_field:colour
Fix the named file, then call checkApp.
Read APP.md with readAppFile, remove or rename the field with editAppFile, then call checkApp again.
Refusals and what to do
The error result's text is the message. structuredContent.error holds code, message, retryable and diagnosticId.
APP_ACCESS_DENIED(app_access_denied): this person does not havemanageaccess on the app, or is not an admin or staff user. An app id that does not exist gets the same answer.APP_INPUT_INVALID(app_input_invalid): the arguments do not match the schema. Send onlyapp, in lowercase kebab-case.- If the connection does not hold both
apps:invokeandapps:write, the tool is not in your tool list, and a call to it returnsMCP error -32602: Tool checkApp not found. Read thepermissionssection ofgetDocs. The person must reconnect, or mint a new token, withapps:write. Only admin and staff can hold it. - A
status.okoffalseis not a refusal. It is the answer.
Related
listAppFilesreturns the samestatuswith the file list.readAppFileandeditAppFilefix the file that a diagnostic names.writeAppFileadds a new migration.deleteAppFileremoves a file that the app no longer needs.