mcp iframe updates

This commit is contained in:
Josh at WLTechBlog
2025-08-16 07:13:33 -05:00
parent cf34368901
commit e1f2c45c3a
11 changed files with 239 additions and 13 deletions

View File

@@ -538,6 +538,11 @@ func main() {
"type": "string",
"description": "Tab ID (optional)",
},
"timeout": map[string]any{
"type": "integer",
"description": "Timeout in seconds",
"default": 5,
},
},
Required: []string{"action"},
},
@@ -551,6 +556,7 @@ func main() {
action := getStringParam(params, "action", "")
selector := getStringParam(params, "selector", "")
tab := getStringParam(params, "tab", cremoteServer.currentTab)
timeout := getIntParam(params, "timeout", 5)
if action == "" {
return nil, fmt.Errorf("action parameter is required")
@@ -567,7 +573,7 @@ func main() {
if selector == "" {
return nil, fmt.Errorf("selector parameter is required for enter action")
}
err = cremoteServer.client.SwitchToIframe(tab, selector)
err = cremoteServer.client.SwitchToIframe(tab, selector, timeout)
cremoteServer.iframeMode = true
message = fmt.Sprintf("Entered iframe: %s", selector)