Run Gradle tasks
gradle_runExecute Gradle tasks through the project's wrapper and return parsed compiler errors. Runs as a job; poll with job_status if still running.
Instructions
Run Gradle tasks through the project's wrapper (e.g. ['assembleDebug'], [':app:testDebugUnitTest'], ['clean','build']). Returns parsed compiler errors. Runs as a job; poll with job_status if still running.
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": {
"tasks": "<tasks>"
},
"name": "gradle_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Extra flags, e.g. --offline, --stacktrace, -Pfoo=bar | |
| tasks | Yes | ||
| waitSec | No | Seconds to wait before returning. If the build is still running, poll with job_status. | |
| projectDir | No | Android project root. Defaults to ANDROID_PROJECT_DIR or the server's cwd. |