@nbakka/mcp-appium 1.0.16 → 1.0.18
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/package.json +1 -1
- package/src/lib/server.js +10 -4
package/package.json
CHANGED
package/src/lib/server.js
CHANGED
|
@@ -118,11 +118,16 @@ server.tool(
|
|
|
118
118
|
deepLink: z.string(),
|
|
119
119
|
},
|
|
120
120
|
async ({ deepLink }) => {
|
|
121
|
-
if (!state.sessionId)
|
|
121
|
+
if (!state.sessionId) {
|
|
122
|
+
return { content: [{ type: "text", text: "No active session" }] };
|
|
123
|
+
}
|
|
122
124
|
try {
|
|
123
|
-
await axios.post(`${APPIUM_URL}/session/${state.sessionId}/
|
|
124
|
-
|
|
125
|
-
args:
|
|
125
|
+
await axios.post(`${APPIUM_URL}/session/${state.sessionId}/appium/execute_driver_script`, {
|
|
126
|
+
script: "mobile: deepLink",
|
|
127
|
+
args: {
|
|
128
|
+
url: deepLink,
|
|
129
|
+
package: "com.locon.housing",
|
|
130
|
+
},
|
|
126
131
|
});
|
|
127
132
|
return { content: [{ type: "text", text: `Deep link opened: ${deepLink}` }] };
|
|
128
133
|
} catch (e) {
|
|
@@ -135,6 +140,7 @@ server.tool(
|
|
|
135
140
|
|
|
136
141
|
|
|
137
142
|
|
|
143
|
+
|
|
138
144
|
// Close Session tool
|
|
139
145
|
server.tool(
|
|
140
146
|
"close_session",
|