push_file
Transfer files from your computer to an Android device using ADB for development, testing, or debugging workflows.
Instructions
Push a file to the device
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": {
"local_path": "<local_path>",
"remote_path": "<remote_path>"
},
"name": "push_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| local_path | Yes | ||
| remote_path | Yes | ||
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/adb_mcp_server/server.py:959-962 (handler)The primary handler for the 'push_file' MCP tool. Decorated with @mcp.tool() for registration, it executes 'adb push' to transfer a file from local_path to remote_path on the specified Android device.
@mcp.tool() def push_file(local_path: str, remote_path: str, device_serial: str | None = None) -> str: """Push a file to the device""" return run_adb(["push", local_path, remote_path], device_serial) - src/adb_mcp_server/server.py:959-959 (registration)The @mcp.tool() decorator registers the push_file function as an MCP tool.
@mcp.tool()