You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/mcp/tools/advanced.ts
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ export function registerAdvancedTools(server: McpServer, session: AppiumSession)
10
10
'advanced_click',
11
11
{
12
12
description: 'Perform an advanced click with modifier keys, multiple clicks, or custom duration. Use this for right-click, Ctrl+click, double-click, etc.',
13
+
annotations: {destructiveHint: false},
13
14
inputSchema: {
14
15
elementId: z.string().optional().describe('Element to click (its center). Provide either elementId or x+y.'),
15
16
x: z.number().int().optional().describe('Absolute screen x coordinate'),
@@ -36,6 +37,7 @@ export function registerAdvancedTools(server: McpServer, session: AppiumSession)
36
37
'send_keys',
37
38
{
38
39
description: 'Send keyboard input. Each action can be a pause (ms delay), text to type, or a virtual key code press/release.',
40
+
annotations: {destructiveHint: false},
39
41
inputSchema: {
40
42
actions: z.array(z.object({
41
43
pause: z.number().int().optional().describe('Pause in milliseconds'),
description: `Wait for a UI element to appear within a configurable timeout, then return its element ID. Useful after dialog opens, page transitions, or loading spinners disappear. ${FIND_STRATEGY_PRIORITY}`,
description: 'Click a UI element by its element ID.',
14
14
inputSchema: {elementId: elementIdSchema},
15
+
annotations: {destructiveHint: false},
15
16
},
16
17
async({ elementId })=>{
17
18
try{
@@ -33,6 +34,7 @@ export function registerInteractTools(server: McpServer, session: AppiumSession)
33
34
elementId: elementIdSchema,
34
35
value: z.string().describe('The text value to set'),
35
36
},
37
+
annotations: {destructiveHint: false},
36
38
},
37
39
async({ elementId, value })=>{
38
40
try{
@@ -51,6 +53,7 @@ export function registerInteractTools(server: McpServer, session: AppiumSession)
51
53
{
52
54
description: 'Clear the text content of an input element.',
53
55
inputSchema: {elementId: elementIdSchema},
56
+
annotations: {destructiveHint: false},
54
57
},
55
58
async({ elementId })=>{
56
59
try{
@@ -69,6 +72,7 @@ export function registerInteractTools(server: McpServer, session: AppiumSession)
69
72
{
70
73
description: 'Get the visible text content of a UI element.',
71
74
inputSchema: {elementId: elementIdSchema},
75
+
annotations: {readOnlyHint: true},
72
76
},
73
77
async({ elementId })=>{
74
78
try{
@@ -85,18 +89,19 @@ export function registerInteractTools(server: McpServer, session: AppiumSession)
85
89
server.registerTool(
86
90
'get_attribute',
87
91
{
88
-
description: 'Get an attribute or property of a UI element. Common attributes: Name, AutomationId, ClassName, IsEnabled, IsOffscreen, ControlType, Value.Value.',
92
+
description: 'Get an attribute or property of a UI element. Common attributes: Name, AutomationId, ClassName, IsEnabled, IsOffscreen, ControlType, Value.Value. Returns an empty string when the attribute is absent.',
89
93
inputSchema: {
90
94
elementId: elementIdSchema,
91
95
attribute: z.string().min(1).describe('Attribute name, e.g. "Name", "IsEnabled", "ControlType"'),
0 commit comments