@nbakka/mcp-appium 3.0.13 → 3.0.14

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.
Files changed (2) hide show
  1. package/lib/server.js +5 -24
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -215,30 +215,11 @@ const createMcpServer = () => {
215
215
  }
216
216
  );
217
217
 
218
- tool("mobile_list_elements_on_screen", "List elements on screen and their coordinates, with display text or accessibility label. Do not cache this result.", {}, async ({}) => {
219
- requireRobot();
220
- const elements = await robot.getElementsOnScreen();
221
- const result = elements.map(element => {
222
- const out = {
223
- type: element.type,
224
- text: element.text,
225
- label: element.label,
226
- name: element.name,
227
- value: element.value,
228
- coordinates: {
229
- x: element.rect.x,
230
- y: element.rect.y,
231
- width: element.rect.width,
232
- height: element.rect.height,
233
- },
234
- };
235
- if (element.focused) {
236
- out.focused = true;
237
- }
238
- return out;
239
- });
240
- return `Found these elements on screen: ${JSON.stringify(result)}`;
241
- });
218
+ tool("mobile_list_elements_on_screen", "List elements on screen and their coordinates, with display text or accessibility label. Returns the complete XML structure to maintain hierarchy for XPath creation. Do not cache this result.", {}, async ({}) => {
219
+ requireRobot();
220
+ const xmlStructure = await robot.getXmlStructure();
221
+ return `Complete XML structure of current screen:\n${xmlStructure}`;
222
+ });
242
223
 
243
224
  tool("mobile_press_button", "Press a button on device", {
244
225
  button: zod_1.z.string().describe("The button to press. Supported buttons: BACK (android only), HOME, VOLUME_UP, VOLUME_DOWN, ENTER, DPAD_CENTER (android tv only), DPAD_UP (android tv only), DPAD_DOWN (android tv only), DPAD_LEFT (android tv only), DPAD_RIGHT (android tv only)"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "3.0.13",
3
+ "version": "3.0.14",
4
4
  "description": "Appium MCP",
5
5
  "engines": {
6
6
  "node": ">=18"