Initial commit

This commit is contained in:
moosecrap committed 2026-11-22 04:45:52 -08:00
commit 52ddc6ba9a
27 files changed
+2166

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import asyncio
from typing import Any, Dict
from tools.utils import ToolError
async def handle(args: Dict[str, Any], bridge: Any) -> list:
"""
Clicks the element with the specified mcp-id.
"""
eid = args.get("id")
if eid is None:
raise ToolError("Missing required argument: 'id'")
request_id = f"req_{asyncio.get_event_loop().time()}_{id(args)}"
params: Dict[str, Any] = {"id": int(eid)}
if args.get("window_id") is not None:
params["window_id"] = int(args["window_id"])
if args.get("tab_id") is not None:
params["tab_id"] = int(args["tab_id"])
await bridge.send_to_extension(request_id, "click_element", params)
return [{"type": "text", "text": f"Clicked element with mcp-id={eid}."}]