1[
2 {
3 "type": "function",
4 "function": {
5 "name": "launch_app",
6 "description": "Launch a mobile application by its visible name.",
7 "parameters": {
8 "type": "object",
9 "properties": {
10 "app_name": {
11 "type": "string",
12 "description": "Visible name of the app to open."
13 }
14 },
15 "required": [
16 "app_name"
17 ]
18 }
19 }
20 },
21 {
22 "type": "function",
23 "function": {
24 "name": "close_app",
25 "description": "Close or force stop a running application.",
26 "parameters": {
27 "type": "object",
28 "properties": {
29 "app_name": {
30 "type": "string",
31 "description": "Visible name of the app to close."
32 }
33 },
34 "required": [
35 "app_name"
36 ]
37 }
38 }
39 },
40 {
41 "type": "function",
42 "function": {
43 "name": "tap",
44 "description": "Tap a single UI element once by its selector. Use tap_coordinates for raw screen pixels.",
45 "parameters": {
46 "type": "object",
47 "properties": {
48 "selector": {
49 "type": "string",
50 "description": "Logical id or label of the element."
51 }
52 },
53 "required": [
54 "selector"
55 ]
56 }
57 }
58 },
59 {
60 "type": "function",
61 "function": {
62 "name": "double_tap",
63 "description": "Double tap a UI element.",
64 "parameters": {
65 "type": "object",
66 "properties": {
67 "selector": {
68 "type": "string",
69 "description": "Logical id or label of the element."
70 }
71 },
72 "required": [
73 "selector"
74 ]
75 }
76 }
77 },
78 {
79 "type": "function",
80 "function": {
81 "name": "long_press",
82 "description": "Press and hold a UI element.",
83 "parameters": {
84 "type": "object",
85 "properties": {
86 "selector": {
87 "type": "string",
88 "description": "Logical id or label of the element."
89 }
90 },
91 "required": [
92 "selector"
93 ]
94 }
95 }
96 },
97 {
98 "type": "function",
99 "function": {
100 "name": "tap_coordinates",
101 "description": "Tap the screen at absolute pixel x/y coordinates, with no element selector.",
102 "parameters": {
103 "type": "object",
104 "properties": {
105 "x": {
106 "type": "integer",
107 "description": "Horizontal pixel coordinate."
108 },
109 "y": {
110 "type": "integer",
111 "description": "Vertical pixel coordinate."
112 }
113 },
114 "required": [
115 "x",
116 "y"
117 ]
118 }
119 }
120 },
121 {
122 "type": "function",
123 "function": {
124 "name": "drag",
125 "description": "Drag one element onto another.",
126 "parameters": {
127 "type": "object",
128 "properties": {
129 "source": {
130 "type": "string",
131 "description": "Logical id of the element to drag."
132 },
133 "target": {
134 "type": "string",
135 "description": "Logical id of the drop target."
136 }
137 },
138 "required": [
139 "source",
140 "target"
141 ]
142 }
143 }
144 },
145 {
146 "type": "function",
147 "function": {
148 "name": "swipe",
149 "description": "Swipe across the screen in a direction.",
150 "parameters": {
151 "type": "object",
152 "properties": {
153 "direction": {
154 "type": "string",
155 "description": "One of: up, down, left, right."
156 }
157 },
158 "required": [
159 "direction"
160 ]
161 }
162 }
163 },
164 {
165 "type": "function",
166 "function": {
167 "name": "pinch",
168 "description": "Pinch with two fingers to zoom in or out on an element. Does not rotate the screen.",
169 "parameters": {
170 "type": "object",
171 "properties": {
172 "selector": {
173 "type": "string",
174 "description": "Logical id of the element to zoom."
175 },
176 "direction": {
177 "type": "string",
178 "description": "Zoom direction: in or out."
179 }
180 },
181 "required": [
182 "selector",
183 "direction"
184 ]
185 }
186 }
187 },
188 {
189 "type": "function",
190 "function": {
191 "name": "scroll_to",
192 "description": "Scroll until an element becomes visible.",
193 "parameters": {
194 "type": "object",
195 "properties": {
196 "selector": {
197 "type": "string",
198 "description": "Logical id of the target element."
199 }
200 },
201 "required": [
202 "selector"
203 ]
204 }
205 }
206 },
207 {
208 "type": "function",
209 "function": {
210 "name": "pull_to_refresh",
211 "description": "Pull down from the top to refresh the screen.",
212 "parameters": {
213 "type": "object",
214 "properties": {},
215 "required": []
216 }
217 }
218 },
219 {
220 "type": "function",
221 "function": {
222 "name": "type_text",
223 "description": "Type text into an input field.",
224 "parameters": {
225 "type": "object",
226 "properties": {
227 "selector": {
228 "type": "string",
229 "description": "Logical id of the input field."
230 },
231 "text": {
232 "type": "string",
233 "description": "Text to enter into the field."
234 }
235 },
236 "required": [
237 "selector",
238 "text"
239 ]
240 }
241 }
242 },
243 {
244 "type": "function",
245 "function": {
246 "name": "clear_text",
247 "description": "Clear the contents of an input field.",
248 "parameters": {
249 "type": "object",
250 "properties": {
251 "selector": {
252 "type": "string",
253 "description": "Logical id of the input field."
254 }
255 },
256 "required": [
257 "selector"
258 ]
259 }
260 }
261 },
262 {
263 "type": "function",
264 "function": {
265 "name": "paste_text",
266 "description": "Paste the clipboard contents into an input field.",
267 "parameters": {
268 "type": "object",
269 "properties": {
270 "selector": {
271 "type": "string",
272 "description": "Logical id of the input field."
273 }
274 },
275 "required": [
276 "selector"
277 ]
278 }
279 }
280 },
281 {
282 "type": "function",
283 "function": {
284 "name": "copy_text",
285 "description": "Copy the text of an element to the clipboard.",
286 "parameters": {
287 "type": "object",
288 "properties": {
289 "selector": {
290 "type": "string",
291 "description": "Logical id of the element to copy from."
292 }
293 },
294 "required": [
295 "selector"
296 ]
297 }
298 }
299 },
300 {
301 "type": "function",
302 "function": {
303 "name": "dismiss_keyboard",
304 "description": "Hide the on-screen keyboard.",
305 "parameters": {
306 "type": "object",
307 "properties": {},
308 "required": []
309 }
310 }
311 },
312 {
313 "type": "function",
314 "function": {
315 "name": "toggle_switch",
316 "description": "Set a toggle or switch to a desired state.",
317 "parameters": {
318 "type": "object",
319 "properties": {
320 "selector": {
321 "type": "string",
322 "description": "Logical id of the switch."
323 },
324 "state": {
325 "type": "string",
326 "description": "Desired state: on or off."
327 }
328 },
329 "required": [
330 "selector",
331 "state"
332 ]
333 }
334 }
335 },
336 {
337 "type": "function",
338 "function": {
339 "name": "set_checkbox",
340 "description": "Check or uncheck a checkbox.",
341 "parameters": {
342 "type": "object",
343 "properties": {
344 "selector": {
345 "type": "string",
346 "description": "Logical id of the checkbox."
347 },
348 "state": {
349 "type": "string",
350 "description": "Desired state: checked or unchecked."
351 }
352 },
353 "required": [
354 "selector",
355 "state"
356 ]
357 }
358 }
359 },
360 {
361 "type": "function",
362 "function": {
363 "name": "select_option",
364 "description": "Select an option from a dropdown or picker.",
365 "parameters": {
366 "type": "object",
367 "properties": {
368 "selector": {
369 "type": "string",
370 "description": "Logical id of the dropdown."
371 },
372 "option": {
373 "type": "string",
374 "description": "Visible option to select."
375 }
376 },
377 "required": [
378 "selector",
379 "option"
380 ]
381 }
382 }
383 },
384 {
385 "type": "function",
386 "function": {
387 "name": "set_slider",
388 "description": "Set a slider to a numeric value.",
389 "parameters": {
390 "type": "object",
391 "properties": {
392 "selector": {
393 "type": "string",
394 "description": "Logical id of the slider."
395 },
396 "value": {
397 "type": "integer",
398 "description": "Target value for the slider."
399 }
400 },
401 "required": [
402 "selector",
403 "value"
404 ]
405 }
406 }
407 },
408 {
409 "type": "function",
410 "function": {
411 "name": "set_date",
412 "description": "Set a date picker to a specific date.",
413 "parameters": {
414 "type": "object",
415 "properties": {
416 "selector": {
417 "type": "string",
418 "description": "Logical id of the date field."
419 },
420 "date": {
421 "type": "string",
422 "description": "Date in YYYY-MM-DD format."
423 }
424 },
425 "required": [
426 "selector",
427 "date"
428 ]
429 }
430 }
431 },
432 {
433 "type": "function",
434 "function": {
435 "name": "set_time",
436 "description": "Set a time picker to a specific time.",
437 "parameters": {
438 "type": "object",
439 "properties": {
440 "selector": {
441 "type": "string",
442 "description": "Logical id of the time field."
443 },
444 "time": {
445 "type": "string",
446 "description": "Time in HH:MM 24-hour format."
447 }
448 },
449 "required": [
450 "selector",
451 "time"
452 ]
453 }
454 }
455 },
456 {
457 "type": "function",
458 "function": {
459 "name": "navigate_back",
460 "description": "Go back one step to the previous screen. Does not return to the home screen.",
461 "parameters": {
462 "type": "object",
463 "properties": {},
464 "required": []
465 }
466 }
467 },
468 {
469 "type": "function",
470 "function": {
471 "name": "go_home",
472 "description": "Return to the device home screen (launcher). This is not a single back step.",
473 "parameters": {
474 "type": "object",
475 "properties": {},
476 "required": []
477 }
478 }
479 },
480 {
481 "type": "function",
482 "function": {
483 "name": "open_app_switcher",
484 "description": "Open the recent apps or app switcher.",
485 "parameters": {
486 "type": "object",
487 "properties": {},
488 "required": []
489 }
490 }
491 },
492 {
493 "type": "function",
494 "function": {
495 "name": "press_keyboard_key",
496 "description": "Press a soft keyboard action key.",
497 "parameters": {
498 "type": "object",
499 "properties": {
500 "key": {
501 "type": "string",
502 "description": "One of: enter, search, done, next, go."
503 }
504 },
505 "required": [
506 "key"
507 ]
508 }
509 }
510 },
511 {
512 "type": "function",
513 "function": {
514 "name": "open_notifications",
515 "description": "Open the notifications panel.",
516 "parameters": {
517 "type": "object",
518 "properties": {},
519 "required": []
520 }
521 }
522 },
523 {
524 "type": "function",
525 "function": {
526 "name": "open_quick_settings",
527 "description": "Open the quick toggles or control panel.",
528 "parameters": {
529 "type": "object",
530 "properties": {},
531 "required": []
532 }
533 }
534 },
535 {
536 "type": "function",
537 "function": {
538 "name": "rotate_screen",
539 "description": "Rotate the screen orientation between portrait and landscape. Does not zoom.",
540 "parameters": {
541 "type": "object",
542 "properties": {
543 "orientation": {
544 "type": "string",
545 "description": "Orientation: portrait or landscape."
546 }
547 },
548 "required": [
549 "orientation"
550 ]
551 }
552 }
553 },
554 {
555 "type": "function",
556 "function": {
557 "name": "set_volume",
558 "description": "Set the media volume to a level.",
559 "parameters": {
560 "type": "object",
561 "properties": {
562 "level": {
563 "type": "integer",
564 "description": "Volume level from 0 to 100."
565 }
566 },
567 "required": [
568 "level"
569 ]
570 }
571 }
572 },
573 {
574 "type": "function",
575 "function": {
576 "name": "wait_for_element",
577 "description": "Wait until a specific element appears, up to a timeout. Requires an element selector.",
578 "parameters": {
579 "type": "object",
580 "properties": {
581 "selector": {
582 "type": "string",
583 "description": "Logical id of the element."
584 },
585 "timeout_ms": {
586 "type": "integer",
587 "description": "Maximum wait time in milliseconds."
588 }
589 },
590 "required": [
591 "selector",
592 "timeout_ms"
593 ]
594 }
595 }
596 },
597 {
598 "type": "function",
599 "function": {
600 "name": "wait",
601 "description": "Pause execution for a fixed duration in milliseconds. Does not wait for any element.",
602 "parameters": {
603 "type": "object",
604 "properties": {
605 "duration_ms": {
606 "type": "integer",
607 "description": "Duration to wait in milliseconds."
608 }
609 },
610 "required": [
611 "duration_ms"
612 ]
613 }
614 }
615 },
616 {
617 "type": "function",
618 "function": {
619 "name": "assert_element_visible",
620 "description": "Assert that an element is visible on screen.",
621 "parameters": {
622 "type": "object",
623 "properties": {
624 "selector": {
625 "type": "string",
626 "description": "Logical id of the element."
627 }
628 },
629 "required": [
630 "selector"
631 ]
632 }
633 }
634 },
635 {
636 "type": "function",
637 "function": {
638 "name": "assert_element_not_visible",
639 "description": "Assert that an element is not visible on screen.",
640 "parameters": {
641 "type": "object",
642 "properties": {
643 "selector": {
644 "type": "string",
645 "description": "Logical id of the element."
646 }
647 },
648 "required": [
649 "selector"
650 ]
651 }
652 }
653 },
654 {
655 "type": "function",
656 "function": {
657 "name": "assert_text_equals",
658 "description": "Assert that an element's text exactly equals an expected value (full match).",
659 "parameters": {
660 "type": "object",
661 "properties": {
662 "selector": {
663 "type": "string",
664 "description": "Logical id of the element."
665 },
666 "expected_text": {
667 "type": "string",
668 "description": "Expected text content."
669 }
670 },
671 "required": [
672 "selector",
673 "expected_text"
674 ]
675 }
676 }
677 },
678 {
679 "type": "function",
680 "function": {
681 "name": "assert_text_contains",
682 "description": "Assert that an element's text contains a substring (partial match).",
683 "parameters": {
684 "type": "object",
685 "properties": {
686 "selector": {
687 "type": "string",
688 "description": "Logical id of the element."
689 },
690 "text": {
691 "type": "string",
692 "description": "Substring expected within the element text."
693 }
694 },
695 "required": [
696 "selector",
697 "text"
698 ]
699 }
700 }
701 },
702 {
703 "type": "function",
704 "function": {
705 "name": "take_screenshot",
706 "description": "Capture a screenshot of the current screen.",
707 "parameters": {
708 "type": "object",
709 "properties": {
710 "name": {
711 "type": "string",
712 "description": "File name for the screenshot."
713 }
714 },
715 "required": [
716 "name"
717 ]
718 }
719 }
720 },
721 {
722 "type": "function",
723 "function": {
724 "name": "open_url",
725 "description": "Open a URL in the default browser.",
726 "parameters": {
727 "type": "object",
728 "properties": {
729 "url": {
730 "type": "string",
731 "description": "Fully qualified URL to open."
732 }
733 },
734 "required": [
735 "url"
736 ]
737 }
738 }
739 }
740]