Session set defaults
session_set_defaultsPin a default project_dir and/or device serial once per session so later Gradle or device calls can omit them; per-call values still override.
Instructions
Pin a default project_dir and/or serial for the rest of this session so later calls can omit them — the fix for a multi-module or multi-flavor project (or multiple attached devices) forcing you to repeat the same project_dir/serial on every Gradle or device call. Only the fields you pass are changed; omit a field to leave its current default alone. An explicit project_dir/serial on any individual call always overrides the session default for that one call.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "session_set_defaults"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Default device serial to use whenever a tool call omits serial. Leave empty to leave the current default unchanged. | |
| project_dir | No | Default Android project root to use whenever a tool call omits project_dir. Leave empty to leave the current default unchanged. |