Files
coreandClaude Opus 5 35b3af97a2 chore: make this repo self-contained
Split out of the agent repository into its own project. The two commits
that introduced and reworked the extension are preserved.

The extension could not build on its own: prebuild called
`python ../../tools/generate_tool_defs.py`, and the 31 tool schemas lived
outside the tree — in a directory that was under no version control at all.

- tools/schema/*.json and tools/generate_tool_defs.py now live here. They
  describe browser tools, so they belong with the extension.
- The generator writes TypeScript into this repo and, when the agent repo is
  checked out next to it, the Python tool definitions there as well. The
  presence check looks for agent/tools.py: checking only for the directory
  was useless — it is almost always true, and the generator then wrote into an
  arbitrary neighbouring folder (verified, then fixed).
- Added .gitignore: dist/, node_modules/, and *.token — the MCP bridge token
  is a runtime secret.

Verified: `npm run build` from a clean checkout with and without the agent
repo present; tsc reports no errors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 18:39:24 +02:00

89 lines
2.3 KiB
JSON

{
"name": "browser_computer",
"description": "Operates mouse and keyboard at pixel coordinates via CDP (isTrusted events). Workflow: action='screenshot' first, read coordinates off that image, then act. Use only for canvas, maps, drag&drop and anything that ignores selectors — for normal HTML browser_find + browser_click are cheaper and more reliable.",
"requires_confirmation": false,
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"screenshot",
"mouse_move",
"left_click",
"right_click",
"middle_click",
"double_click",
"triple_click",
"left_click_drag",
"left_mouse_down",
"left_mouse_up",
"scroll",
"type",
"key",
"hold_key",
"wait",
"cursor_position"
],
"description": "What to do. Pixel coordinates come from a screenshot."
},
"coordinate": {
"type": "array",
"items": {
"type": "integer"
},
"minItems": 2,
"maxItems": 2,
"description": "[x, y] in screenshot pixels."
},
"start_coordinate": {
"type": "array",
"items": {
"type": "integer"
},
"minItems": 2,
"maxItems": 2,
"description": "[x, y] where a drag begins."
},
"text": {
"type": "string",
"description": "Text to type, or key name for key presses (e.g. 'Return', 'ctrl+a')."
},
"scroll_direction": {
"type": "string",
"enum": [
"up",
"down",
"left",
"right"
],
"description": "up | down | left | right"
},
"scroll_amount": {
"type": "integer",
"description": "Number of wheel clicks."
},
"duration": {
"type": "number",
"description": "Seconds to hold or wait."
},
"modifiers": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ctrl",
"alt",
"shift",
"meta"
]
},
"description": "Held modifier keys, e.g. ['ctrl','shift']."
}
},
"required": [
"action"
]
}
}