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>
31 lines
1.1 KiB
JSON
31 lines
1.1 KiB
JSON
{
|
|
"name": "browser_read_page",
|
|
"description": "Reads the accessibility tree of the page: a compact view of what is on screen and interactive. Cheaper and more precise than a screenshot for normal HTML. Every interactive node carries a ref_id — pass it to browser_click/type/select instead of guessing a selector. Fields report label, role and editable.",
|
|
"requires_confirmation": false,
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"viewportOnly": {
|
|
"type": "boolean",
|
|
"description": "Only what is currently visible (default true)."
|
|
},
|
|
"maxDepth": {
|
|
"type": "number",
|
|
"description": "Maximum nesting depth."
|
|
},
|
|
"maxTokens": {
|
|
"type": "number",
|
|
"description": "Budget; the tree is cut off when reached."
|
|
},
|
|
"includeHidden": {
|
|
"type": "boolean",
|
|
"description": "Include invisible elements (default false)."
|
|
},
|
|
"selector": {
|
|
"type": "string",
|
|
"description": "Read only this subtree, e.g. a compose form."
|
|
}
|
|
}
|
|
}
|
|
}
|