Personae
v0.2.1Control specific, already-open account-isolated Personae browser identities with MCP.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
load_skill
Load agent-browser 官方命令语法说明,内容随本机捆绑的二进制版本,保证 flag 真实存在。**在用 act 工具手写 agent-browser 命令前必须先调用本工具** —— 它的语法在版本间会变(本机版本就没有网上文档里的 `tab --url` 和 `--pin-tab`),凭记忆猜必然失败。注意:本 app 的多身份窗口应优先用 snapshot/click/fill/navigate 等专用工具操作,它们已处理好「身份→窗口」定位;只有需要专用工具没覆盖的能力时才手写命令。
| Parameter | Type | Description |
|---|---|---|
section | string | 可选:只关心某方面时填关键词过滤,如 snapshot / click / tab / eval / screenshot / batch。留空返回全部语法。 |
list_identities
列出所有浏览器身份(partition)及其 CDP targetId、是否已打开、当前页面。任何操作前先调用此工具确认身份状态 —— 这是把 partition 对应到 CDP target 的唯一途径。
open_identity
打开(或聚焦)指定身份的浏览器窗口。窗口打开后才会生成 targetId,agent 才能操作它。
| Parameter | Type | Description |
|---|---|---|
identity * | string | 身份 id 或名称 |
snapshot
读取指定身份窗口的可交互元素快照(accessibility tree + @eN refs)。会自动定位到该身份的窗口,不会读到别的身份。注意:ref 只在单次调用内有效,click/fill 等工具会各自重新 snapshot,因此你只需把「元素的可读名称」记住,让后续工具自己按名称定位;若要按 ref 操作,请用 act 工具在一次调用内完成。若要读该身份下弹出的子窗口(OAuth/分享等),传 target=子窗口的 targetId(见 list_identities)。
| Parameter | Type | Description |
|---|---|---|
identity * | string | 身份 id 或名称 |
compact | boolean | 精简输出,默认 true |
target | string | 可选:该身份下子窗口的 targetId 或序号,不传则操作主窗口 |
click
点击指定身份窗口中的元素。按元素可读名称定位(推荐),或直接给 @eN ref —— 本工具内部会先重新 snapshot 再点击,所以 ref 用的是最新一次快照的编号。
| Parameter | Type | Description |
|---|---|---|
identity * | string | |
ref | string | @eN 形式的元素 ref |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |
text | string | 元素可读文本,如「百度一下」;与 ref 二选一 |
fill
清空并填入文本。按元素可读名称/label 定位(推荐),或给 @eN ref(内部会先重新 snapshot)。
| Parameter | Type | Description |
|---|---|---|
identity * | string | |
text * | string | 要填入的内容 |
label | string | 输入框的 label 或占位文本;与 ref 二选一 |
ref | string | @eN 形式的元素 ref |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |
press
发送按键,如 Enter、Tab、Control+a。作用于该身份窗口当前焦点。
| Parameter | Type | Description |
|---|---|---|
identity * | string | |
key * | string | |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |
act
在一次调用内对同一身份连续执行多个 agent_browser 命令,ref 在这些命令之间有效。适合「snapshot → 点这个 → 填那个 → 回车」这种多步流程。命令用 agent_browser 语法,如 ["snapshot -i", "fill @e35 关键词", "press Enter"]。会自动前置 tab 切换。
| Parameter | Type | Description |
|---|---|---|
commands * | array | agent_browser 命令字符串数组,按顺序在同一进程内执行 |
identity * | string | |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |
get_text
读取元素文本。可传 @eN ref(内部会先重新 snapshot)或 CSS 选择器。
| Parameter | Type | Description |
|---|---|---|
identity * | string | |
ref * | string | @eN ref 或 CSS 选择器 |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |
get_url
读取该身份窗口当前的 URL。
| Parameter | Type | Description |
|---|---|---|
identity * | string | |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |
screenshot
截图指定身份的窗口,保存到给定绝对路径。
| Parameter | Type | Description |
|---|---|---|
identity * | string | |
path * | string | 输出文件绝对路径,.png |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |
eval_js
在指定身份窗口内执行 JavaScript 并返回结果。用于读取页面状态、验证隔离等。
| Parameter | Type | Description |
|---|---|---|
expression * | string | |
identity * | string | |
target | string | 可选:子窗口 targetId 或序号,不传则操作主窗口 |