@iflow-mcp/tiagodanin-android-debug-bridge-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +99 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/definitions.d.ts +196 -0
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/definitions.js +136 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers.d.ts +64 -0
- package/dist/tools/handlers.d.ts.map +1 -0
- package/dist/tools/handlers.js +356 -0
- package/dist/tools/handlers.js.map +1 -0
- package/dist/utils/shell.d.ts +4 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +74 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +2 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +7 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/xmlParser.d.ts +40 -0
- package/dist/utils/xmlParser.d.ts.map +1 -0
- package/dist/utils/xmlParser.js +256 -0
- package/dist/utils/xmlParser.js.map +1 -0
- package/package.json +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2025 Tiago Danin
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Android Debug Bridge MCP
|
|
2
|
+
|
|
3
|
+
MCP plugin to control Android devices via ADB for automation, testing, and agent integration.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
This MCP server provides tools to:
|
|
8
|
+
|
|
9
|
+
- **Test Management**: Create test folders for organizing automation tests
|
|
10
|
+
- **App Control**: List installed apps by name pattern and open apps by package name
|
|
11
|
+
- **Screen Capture**: Take screenshots and save them to organized test folders
|
|
12
|
+
- **UI Analysis**: Capture UI hierarchy dumps for element inspection
|
|
13
|
+
- **Input Simulation**:
|
|
14
|
+
- Send key events (BACK, HOME, ENTER, DELETE)
|
|
15
|
+
- Tap at specific coordinates
|
|
16
|
+
- Input text into active fields
|
|
17
|
+
- Scroll in any direction (up, down, left, right)
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Install the package globally via npm:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g android-debug-bridge-mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Setup for Different AI Clients
|
|
28
|
+
|
|
29
|
+
### Claude Code (CLI)
|
|
30
|
+
|
|
31
|
+
Add to your MCP configuration in `~/.claude/mcp.json`:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"android-debug-bridge": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["android-debug-bridge-mcp"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
or
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
claude mcp add --scope project android-debug-bridge-mcp -- npx android-debug-bridge-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Cursor
|
|
51
|
+
|
|
52
|
+
Add to your MCP configuration in Cursor settings:
|
|
53
|
+
|
|
54
|
+
1. Open Cursor Settings
|
|
55
|
+
2. Navigate to Extensions → MCP
|
|
56
|
+
3. Add a new server with:
|
|
57
|
+
- **Name**: `android-debug-bridge`
|
|
58
|
+
- **Command**: `npx`
|
|
59
|
+
- **Args**: `["android-debug-bridge-mcp"]`
|
|
60
|
+
|
|
61
|
+
### Claude Desktop
|
|
62
|
+
|
|
63
|
+
Add to your MCP configuration file:
|
|
64
|
+
|
|
65
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
66
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
67
|
+
**Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"android-debug-bridge": {
|
|
73
|
+
"command": "npx",
|
|
74
|
+
"args": ["android-debug-bridge-mcp"]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Prerequisites
|
|
81
|
+
|
|
82
|
+
- Android Debug Bridge (ADB) must be installed and available in your PATH
|
|
83
|
+
- Android device with USB debugging enabled, or Android emulator running
|
|
84
|
+
- Device must be connected and authorized for debugging
|
|
85
|
+
|
|
86
|
+
## Usage
|
|
87
|
+
|
|
88
|
+
Once configured, you can interact with Android devices through your AI client by asking questions like:
|
|
89
|
+
|
|
90
|
+
- "Create a test folder called 'login_test'"
|
|
91
|
+
- "List all apps with 'chrome' in the name"
|
|
92
|
+
- "Open the app com.android.chrome"
|
|
93
|
+
- "Take a screenshot and save it as step '001_homepage'"
|
|
94
|
+
- "Capture the current UI hierarchy in my app"
|
|
95
|
+
- ...
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
5
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
7
|
+
const definitions_js_1 = require("./tools/definitions.js");
|
|
8
|
+
const handlers_js_1 = require("./tools/handlers.js");
|
|
9
|
+
const server = new index_js_1.Server({
|
|
10
|
+
name: 'mcp-adb',
|
|
11
|
+
version: '0.1.0',
|
|
12
|
+
}, {
|
|
13
|
+
capabilities: {
|
|
14
|
+
tools: {},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
18
|
+
return {
|
|
19
|
+
tools: definitions_js_1.toolDefinitions,
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
23
|
+
const { name, arguments: args } = request.params;
|
|
24
|
+
try {
|
|
25
|
+
const handler = handlers_js_1.toolHandlers[name];
|
|
26
|
+
if (!handler) {
|
|
27
|
+
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
28
|
+
}
|
|
29
|
+
return await handler(args);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
33
|
+
throw new types_js_1.McpError(types_js_1.ErrorCode.InternalError, `Tool execution failed: ${errorMessage}`);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
async function main() {
|
|
37
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
38
|
+
await server.connect(transport);
|
|
39
|
+
// Optional: Log server start
|
|
40
|
+
console.error('MCP ADB Server started');
|
|
41
|
+
}
|
|
42
|
+
main().catch((error) => {
|
|
43
|
+
console.error('Server failed to start:', error);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,wEAAmE;AACnE,wEAAiF;AACjF,iEAK4C;AAC5C,2DAAyD;AACzD,qDAAmD;AAEnD,MAAM,MAAM,GAAG,IAAI,iBAAM,CACvB;IACE,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAC;AAEF,MAAM,CAAC,iBAAiB,CAAC,iCAAsB,EAAE,KAAK,IAAI,EAAE;IAC1D,OAAO;QACL,KAAK,EAAE,gCAAe;KACvB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,iBAAiB,CAAC,gCAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAChE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAEjD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,0BAAY,CAAC,IAAiC,CAAC,CAAC;QAChE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,mBAAQ,CAAC,oBAAS,CAAC,cAAc,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,IAAI,mBAAQ,CAAC,oBAAS,CAAC,aAAa,EAAE,0BAA0B,YAAY,EAAE,CAAC,CAAC;IACxF,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,6BAA6B;IAC7B,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;AAC1C,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
export declare const toolDefinitions: ({
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
test_name: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
app_name?: undefined;
|
|
12
|
+
package_name?: undefined;
|
|
13
|
+
step_name?: undefined;
|
|
14
|
+
key?: undefined;
|
|
15
|
+
x?: undefined;
|
|
16
|
+
y?: undefined;
|
|
17
|
+
text?: undefined;
|
|
18
|
+
direction?: undefined;
|
|
19
|
+
};
|
|
20
|
+
required: string[];
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: string;
|
|
27
|
+
properties: {
|
|
28
|
+
app_name: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
test_name?: undefined;
|
|
33
|
+
package_name?: undefined;
|
|
34
|
+
step_name?: undefined;
|
|
35
|
+
key?: undefined;
|
|
36
|
+
x?: undefined;
|
|
37
|
+
y?: undefined;
|
|
38
|
+
text?: undefined;
|
|
39
|
+
direction?: undefined;
|
|
40
|
+
};
|
|
41
|
+
required: string[];
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: string;
|
|
48
|
+
properties: {
|
|
49
|
+
package_name: {
|
|
50
|
+
type: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
test_name?: undefined;
|
|
54
|
+
app_name?: undefined;
|
|
55
|
+
step_name?: undefined;
|
|
56
|
+
key?: undefined;
|
|
57
|
+
x?: undefined;
|
|
58
|
+
y?: undefined;
|
|
59
|
+
text?: undefined;
|
|
60
|
+
direction?: undefined;
|
|
61
|
+
};
|
|
62
|
+
required: string[];
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: string;
|
|
69
|
+
properties: {
|
|
70
|
+
test_name: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
step_name: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
app_name?: undefined;
|
|
79
|
+
package_name?: undefined;
|
|
80
|
+
key?: undefined;
|
|
81
|
+
x?: undefined;
|
|
82
|
+
y?: undefined;
|
|
83
|
+
text?: undefined;
|
|
84
|
+
direction?: undefined;
|
|
85
|
+
};
|
|
86
|
+
required: string[];
|
|
87
|
+
};
|
|
88
|
+
} | {
|
|
89
|
+
name: string;
|
|
90
|
+
description: string;
|
|
91
|
+
inputSchema: {
|
|
92
|
+
type: string;
|
|
93
|
+
properties: {
|
|
94
|
+
test_name?: undefined;
|
|
95
|
+
app_name?: undefined;
|
|
96
|
+
package_name?: undefined;
|
|
97
|
+
step_name?: undefined;
|
|
98
|
+
key?: undefined;
|
|
99
|
+
x?: undefined;
|
|
100
|
+
y?: undefined;
|
|
101
|
+
text?: undefined;
|
|
102
|
+
direction?: undefined;
|
|
103
|
+
};
|
|
104
|
+
required?: undefined;
|
|
105
|
+
};
|
|
106
|
+
} | {
|
|
107
|
+
name: string;
|
|
108
|
+
description: string;
|
|
109
|
+
inputSchema: {
|
|
110
|
+
type: string;
|
|
111
|
+
properties: {
|
|
112
|
+
key: {
|
|
113
|
+
type: string;
|
|
114
|
+
enum: string[];
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
test_name?: undefined;
|
|
118
|
+
app_name?: undefined;
|
|
119
|
+
package_name?: undefined;
|
|
120
|
+
step_name?: undefined;
|
|
121
|
+
x?: undefined;
|
|
122
|
+
y?: undefined;
|
|
123
|
+
text?: undefined;
|
|
124
|
+
direction?: undefined;
|
|
125
|
+
};
|
|
126
|
+
required: string[];
|
|
127
|
+
};
|
|
128
|
+
} | {
|
|
129
|
+
name: string;
|
|
130
|
+
description: string;
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: string;
|
|
133
|
+
properties: {
|
|
134
|
+
x: {
|
|
135
|
+
type: string;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
y: {
|
|
139
|
+
type: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
test_name?: undefined;
|
|
143
|
+
app_name?: undefined;
|
|
144
|
+
package_name?: undefined;
|
|
145
|
+
step_name?: undefined;
|
|
146
|
+
key?: undefined;
|
|
147
|
+
text?: undefined;
|
|
148
|
+
direction?: undefined;
|
|
149
|
+
};
|
|
150
|
+
required: string[];
|
|
151
|
+
};
|
|
152
|
+
} | {
|
|
153
|
+
name: string;
|
|
154
|
+
description: string;
|
|
155
|
+
inputSchema: {
|
|
156
|
+
type: string;
|
|
157
|
+
properties: {
|
|
158
|
+
text: {
|
|
159
|
+
type: string;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
test_name?: undefined;
|
|
163
|
+
app_name?: undefined;
|
|
164
|
+
package_name?: undefined;
|
|
165
|
+
step_name?: undefined;
|
|
166
|
+
key?: undefined;
|
|
167
|
+
x?: undefined;
|
|
168
|
+
y?: undefined;
|
|
169
|
+
direction?: undefined;
|
|
170
|
+
};
|
|
171
|
+
required: string[];
|
|
172
|
+
};
|
|
173
|
+
} | {
|
|
174
|
+
name: string;
|
|
175
|
+
description: string;
|
|
176
|
+
inputSchema: {
|
|
177
|
+
type: string;
|
|
178
|
+
properties: {
|
|
179
|
+
direction: {
|
|
180
|
+
type: string;
|
|
181
|
+
enum: string[];
|
|
182
|
+
description: string;
|
|
183
|
+
};
|
|
184
|
+
test_name?: undefined;
|
|
185
|
+
app_name?: undefined;
|
|
186
|
+
package_name?: undefined;
|
|
187
|
+
step_name?: undefined;
|
|
188
|
+
key?: undefined;
|
|
189
|
+
x?: undefined;
|
|
190
|
+
y?: undefined;
|
|
191
|
+
text?: undefined;
|
|
192
|
+
};
|
|
193
|
+
required: string[];
|
|
194
|
+
};
|
|
195
|
+
})[];
|
|
196
|
+
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmI3B,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toolDefinitions = void 0;
|
|
4
|
+
exports.toolDefinitions = [
|
|
5
|
+
{
|
|
6
|
+
name: 'create_test_folder',
|
|
7
|
+
description: 'Create a test folder with the specified name',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
test_name: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'Name of the test folder to create',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
required: ['test_name'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'list_apps',
|
|
21
|
+
description: 'List installed apps matching a name pattern',
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
app_name: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Name pattern to search for in app packages',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
required: ['app_name'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'open_app',
|
|
35
|
+
description: 'Open an app using its package name and activity',
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
package_name: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Full package name of the app (e.g., com.example.app)',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ['package_name'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'capture_screenshot',
|
|
49
|
+
description: 'Capture a screenshot and save it to the test folder',
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
properties: {
|
|
53
|
+
test_name: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'Name of the test folder where to save the screenshot',
|
|
56
|
+
},
|
|
57
|
+
step_name: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'Name of the step for the screenshot file (e.g., "001_login")',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
required: ['test_name', 'step_name'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'capture_ui_dump',
|
|
67
|
+
description: 'Capture UI hierarchy dump from the device',
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'input_keyevent',
|
|
75
|
+
description: 'Send key events (BACK, HOME, ENTER, DELETE)',
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
key: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
enum: ['BACK', 'HOME', 'ENTER', 'DELETE'],
|
|
82
|
+
description: 'Key event to send',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
required: ['key'],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'input_tap',
|
|
90
|
+
description: 'Tap at specific coordinates',
|
|
91
|
+
inputSchema: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
x: {
|
|
95
|
+
type: 'number',
|
|
96
|
+
description: 'X coordinate for tap',
|
|
97
|
+
},
|
|
98
|
+
y: {
|
|
99
|
+
type: 'number',
|
|
100
|
+
description: 'Y coordinate for tap',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
required: ['x', 'y'],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'input_text',
|
|
108
|
+
description: 'Input text into the current field',
|
|
109
|
+
inputSchema: {
|
|
110
|
+
type: 'object',
|
|
111
|
+
properties: {
|
|
112
|
+
text: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Text to input',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
required: ['text'],
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'input_scroll',
|
|
122
|
+
description: 'Perform scroll action',
|
|
123
|
+
inputSchema: {
|
|
124
|
+
type: 'object',
|
|
125
|
+
properties: {
|
|
126
|
+
direction: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
enum: ['up', 'down', 'left', 'right'],
|
|
129
|
+
description: 'Direction to scroll',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
required: ['direction'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
];
|
|
136
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const toolHandlers: {
|
|
2
|
+
create_test_folder: (args: any) => Promise<{
|
|
3
|
+
content: {
|
|
4
|
+
type: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}[];
|
|
7
|
+
}>;
|
|
8
|
+
list_apps: (args: any) => Promise<{
|
|
9
|
+
content: {
|
|
10
|
+
type: string;
|
|
11
|
+
text: string;
|
|
12
|
+
}[];
|
|
13
|
+
}>;
|
|
14
|
+
open_app: (args: any) => Promise<{
|
|
15
|
+
content: {
|
|
16
|
+
type: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
capture_screenshot: (args: any) => Promise<{
|
|
21
|
+
content: ({
|
|
22
|
+
type: string;
|
|
23
|
+
text: string;
|
|
24
|
+
data?: undefined;
|
|
25
|
+
mimeType?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
type: string;
|
|
28
|
+
data: string;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
text?: undefined;
|
|
31
|
+
})[];
|
|
32
|
+
}>;
|
|
33
|
+
capture_ui_dump: (args: any) => Promise<{
|
|
34
|
+
content: {
|
|
35
|
+
type: string;
|
|
36
|
+
text: string;
|
|
37
|
+
}[];
|
|
38
|
+
}>;
|
|
39
|
+
input_keyevent: (args: any) => Promise<{
|
|
40
|
+
content: {
|
|
41
|
+
type: string;
|
|
42
|
+
text: string;
|
|
43
|
+
}[];
|
|
44
|
+
}>;
|
|
45
|
+
input_tap: (args: any) => Promise<{
|
|
46
|
+
content: {
|
|
47
|
+
type: string;
|
|
48
|
+
text: string;
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
input_text: (args: any) => Promise<{
|
|
52
|
+
content: {
|
|
53
|
+
type: string;
|
|
54
|
+
text: string;
|
|
55
|
+
}[];
|
|
56
|
+
}>;
|
|
57
|
+
input_scroll: (args: any) => Promise<{
|
|
58
|
+
content: {
|
|
59
|
+
type: string;
|
|
60
|
+
text: string;
|
|
61
|
+
}[];
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/tools/handlers.ts"],"names":[],"mappings":"AAsFA,eAAO,MAAM,YAAY;+BACU,GAAG;;;;;;sBAgBZ,GAAG;;;;;;qBA8BJ,GAAG;;;;;;+BA8BO,GAAG;;;;;;;;;;;;;4BAyDN,GAAG;;;;;;2BAOJ,GAAG;;;;;;sBA4CR,GAAG;;;;;;uBAgCF,GAAG;;;;;;yBAmCD,GAAG;;;;;;CA2C/B,CAAC"}
|