veddata
v0.2.0MCP server for AI agents: discover a web page's data sources and drive the page to reach them.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ved_open Ved Open
启动数据发现会话。打开浏览器以开始捕获页面数据源。浏览网页是前置步骤,不是终点。 Launches a Playwright Chromium session (persistent context) and clears old state. Does NOT navigate — use ved_goto() for that.
ved_goto Ved Goto
导航到目标页面,自动发现所有数据来源。返回 DOM 结构、网络请求、内嵌数据清单。 Starts network monitoring BEFORE navigating (event-driven attach happens at tab registration, which precedes goto). Use new_tab=True to open in a new tab while keeping the current page.
| Parameter | Type | Description |
|---|---|---|
url * | string | Target URL to navigate to. |
depth | integer | DOM 树深度(默认 2,够看清结构;要细看传 4-8)。 |
limit | integer | 捕获清单预览条数(默认 10;完整清单用 ved_apis 分页取)。 |
new_tab | boolean | True = create new tab; False = navigate current tab. |
ved_close Ved Close
Close the browser and clear all captured data. Closes the Playwright context and resets all state.
ved_tabs Ved Tabs
List all open browser tabs with their URLs — 这是"重新建档"的入口。 页面自己跳走、用户开关标签页之后,依赖活状态的工具会被拒绝; 先调这个(或 ved_status)确认现状,再继续。
ved_tab_switch Ved Tab Switch
Switch the active tab by CDP short ID (from ved_tabs output). After switching, ved_goto() targets the new tab.
| Parameter | Type | Description |
|---|---|---|
tab * | string | CDP short ID (first 8 chars, from ved_tabs output). |
ved_tab_close Ved Tab Close
Close browser tab(s) by CDP short ID and prune their API records. 两种写法等价:``tab="C724404D,5FD84E84"``(逗号分隔)或 ``tabs=["C724404D","5FD84E84"]``。 都不给 = 关闭当前标签。**最后一个标签不会被关掉** —— 全关会让会话没有可用页面 (要结束会话请用 ved_close)。
| Parameter | Type | Description |
|---|---|---|
tab | string | CDP short ID(s), comma-separated. |
tabs | CDP short ID 列表(与 tab 合并处理)。 |
ved_status Ved Status
状态体检:现在有哪些标签页、各自在哪个页面、有没有撞上人机门。 用户说"登录好了 / 验证过了"之后**先调这个** —— 不要重新导航(会再次触发风控)。 它同时是一次"重新建档":调过之后依赖活状态的工具才放行。
ved_fetch Ved Fetch
获取页面全文,辅助定位数据关键词。当需要从页面文本中选取关键词来反查数据时使用。 First call scrolls to bottom and writes a JSON cache file. Subsequent calls with start_index read from cache (no re-scroll).
| Parameter | Type | Description |
|---|---|---|
max_length | integer | Characters per chunk (default 5000). |
start_index | integer | Start position (default 0). |
tab | string | CDP short ID (empty = current active tab). |
ved_screenshot Ved Screenshot
截图当前页面。
| Parameter | Type | Description |
|---|---|---|
full_page | boolean | True = 整页,False = 当前视口。 |
name | string | 可选的文件名前缀(留空则只用站点名+时间戳)。 |
output_dir | 本次落盘目录(绝对路径),覆盖 --response-dir。 |
ved_dom_tree Ved Dom Tree
输出当前页面的 DOM 目录树(内存快照,含容器/字段/交互标记)。 首次调用或页面导航后会自动重新扫描;此后从内存读取,不再调浏览器。
| Parameter | Type | Description |
|---|---|---|
depth | integer | 树的显示深度(默认 2,够看清结构;要细看传 4-8)。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_dom_search Ved Dom Search
在内存 DOM 树中搜索文本。 不调浏览器,直接在保存的树结构里查找。返回匹配的节点路径和上下文。
| Parameter | Type | Description |
|---|---|---|
keyword * | string | 搜索关键字(匹配文本/属性/id,大小写不敏感)。 |
limit | integer | 本次返回条数(默认 30)。 |
offset | integer | 从第几处匹配开始(默认 0)。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_dom_locate Ved Dom Locate
通过路径定位一个 DOM 节点。 路径要**从根节点开始**(第一段必须匹配 ``html``)—— 例如 ``html > body.win > div#app > div.feed-card``(可直接从 ved_dom_tree 的输出里抄)。 段格式:``tag[.class][#id][:nth-child(n)]``,``>`` 分隔。
| Parameter | Type | Description |
|---|---|---|
path * | string | 节点路径(从 html 开始)。 |
depth | integer | 子树的显示深度(默认 3)。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_cookies Ved Cookies
View cookies for the current page.
| Parameter | Type | Description |
|---|---|---|
all_domains | boolean | False = current domain only, True = all domains. |
all_info | boolean | False = name/value/domain only, True = include path/httpOnly/secure/expires. |
filter | string | 逗号分隔的名字片段(大小写不敏感子串),如 "sessionid,sid_tt,ttwid"。 命中时**不裁剪 cookie 值** —— 用来取完整的登录票据。 |
tab | string | CDP short ID (empty = current active tab). |
ved_console Ved Console
操作页面控制台:执行 JS / 查看 log/warn/error 消息。 code 非空 → 在页面执行 JS,返回执行结果。 code 为空 → 返回控制台历史消息(log/warn/error,来自官方内置缓冲)。 tail → 只看最近 N 条;filter → 按文本过滤。
| Parameter | Type | Description |
|---|---|---|
code | string | 要执行的 JS 代码(空 = 查看历史消息)。 |
filter | string | 按文本过滤消息。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
tail | integer | 只看最近 N 条消息(0 = 全部)。 |
ved_act Ved Act
Execute actions on the page: input, scroll, click, or select. Two modes: 1. Single step: ved_act("scroll", "bottom") ved_act("input", "python教程", target="搜索") ved_act("click", target="下一页") ved_act("select", "最多播放", target="综合排序") ved_act("click", target="css=a[href*='/download/']") ← target 也接受选择器 ved_act("click", target="//a[contains(@href,'/download/')]") 2. Chain: ved_act(actions=[ {"action": "input", "value": "python教程", "target": "搜索"}, {"action": "scroll", "value": "bottom"}, {"action": "click", "tar…
| Parameter | Type | Description |
|---|---|---|
action | string | "input", "scroll", "click", or "select" (single mode). |
actions | List of action dicts for chain mode. | |
force | boolean | true 时跳过"状态已变化"的准入检查 —— 先重新建档,再执行本次动作。 页面自行跳转(SPA 路由变化)后不必再手动调 ved_status。 |
target | Visible text of the target element. | |
value | Text input or scroll target (bottom/top/down/up/px). |
ved_apis Ved Apis
列出已捕获的所有数据。包括网络请求、DOM 内嵌数据、JS 变量等。每条记录标注触发时机,不贴类型标签。
| Parameter | Type | Description |
|---|---|---|
keyword | 按 path 或响应体过滤(可选)。 | |
limit | integer | 本次返回条数(默认 30)。 |
offset | integer | 从第几条开始(默认 0)。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_inspect Ved Inspect
Show full request and response details for one or more APIs.
| Parameter | Type | Description |
|---|---|---|
detail | string | "preview" or "full". |
index | integer | API ID (from ved_apis output). Use 0 when using indices. |
indices | string | Comma-separated API IDs (e.g. "2,4"). Overrides index. |
tab | string | CDP short ID (empty = current active tab). |
ved_search Ved Search
在已捕获的所有数据中搜索关键词。包括网络请求、DOM 内嵌 JSON、页面渲染文本和 JS 全局变量。 Supports comma-separated keywords for OR search.
| Parameter | Type | Description |
|---|---|---|
keyword * | string | Search term, or comma-separated terms for OR logic. |
tab | string | CDP short ID (empty = current active tab). |
ved_context Ved Context
Search all data sources for keyword, returning field paths and values.
| Parameter | Type | Description |
|---|---|---|
keyword * | string | Search term, or comma-separated terms for OR logic. |
tab | string | CDP short ID (empty = current active tab). |
ved_export Ved Export
导出捕获到的 API 数据源(一个或多个)。
| Parameter | Type | Description |
|---|---|---|
format | string | "raw" | "compact" | "both"(默认 both)。compact 只返回字段文档,不写盘。 |
index | integer | API ID(来自 ved_apis 输出)。用 indices 时传 0。 |
indices | string | 逗号分隔的 API ID(如 "2,4"),优先于 index。 |
output_dir | 本次落盘目录(**绝对路径**),覆盖启动参数 --response-dir。 | |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_export_all Ved Export All
一次导出当前 tab 捕获到的所有 API 数据源。
| Parameter | Type | Description |
|---|---|---|
format | string | "raw" | "compact" | "both"(默认 both)。compact 只返回字段文档,不写盘。 |
output_dir | 本次落盘目录(**绝对路径**),覆盖启动参数 --response-dir。 | |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_peek Ved Peek
快速探测指定 URL 的数据源。打开页面 → 自动捕获 API → 返回字段文档。
| Parameter | Type | Description |
|---|---|---|
url * | string | Target page URL. |
method | Optional HTTP method filter ("GET" or "POST"). | |
path_contains | Optional API path filter (e.g. "/search/notes"). |
ved_request Ved Request
Send a test HTTP request — replay from captured API or fully custom. Three modes: 1. Replay: index=3, params='{"page":2}' — 用 API #3 的 URL/method/headers 作底, params/headers 在其上**覆盖或删除**。 2. Manual: url="...", method="POST", body="..." — fully custom。 3. Raw: index=3, raw=true, headers='{"cookie":"sessionid=..."}' — 原样发出: 不继承捕获记录的头/参数/body,不注入 cookie 与 XSRF,只发你给的东西。 覆盖语义:``params`` / ``headers`` 里 **值为 null 表示删掉该键**,其余为设置/覆盖。 非 raw 模式下 c…
| Parameter | Type | Description |
|---|---|---|
body | string | JSON string of request body. |
headers | string | JSON string of extra headers; ``null`` 值删除该键。 |
index | integer | API record number to replay (0 = manual mode). |
method | string | HTTP method (default "GET"). |
params | string | JSON string of query parameters; ``null`` 值删除该键。 |
raw | boolean | 原样发出(见模式 3)。 |
tab | string | CDP short ID for cookie sync (empty = current active tab). |
url | string | Request URL (manual mode). |
ved_watch Ved Watch
批量观测:注册请求/JS 观测点 → 触发操作 → 一次性取回快照。 四种用法(都不传 = 列出当前观测点): 1. 注册:``ved_watch(observations=[{...}, {...}])`` —— 一次可打多个点 2. 列表:``ved_watch()`` —— 看 id / 类型 / 目标 / 命中数 / 状态 3. 收集:``ved_watch(collect=True)`` —— 等所有点命中(或超时)后返回报告 4. 删除:``ved_watch(remove="w1,w3")``,``remove="all"`` 清空 observation 项: {"type": "request", "pattern": "/api/*"} — 请求(glob 或 /regex/) {…
| Parameter | Type | Description |
|---|---|---|
collect | boolean | True = 等待收集并返回报告(保留观测点;清理用 remove)。 |
limit | integer | 报告里最多显示几条快照(默认 5)。 |
observations | 观测点列表。 | |
remove | string | 要删除的观测点 id,逗号分隔;"all" 表示全部删除。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
timeout | number | 收集超时秒数(默认 15)。 |
ved_list_scripts Ved List Scripts
列出页面所有 JS 脚本的 URL、大小和行数。 用于定位目标脚本后传给 ved_script_source。内联的 ``data:`` 脚本**只给摘要** —— 页面里常有几百 KB 的 wasm/base64,整段吐出来会一次性烧掉大量上下文。
| Parameter | Type | Description |
|---|---|---|
limit | integer | 本次返回个数(默认 30)。 |
offset | integer | 从第几个脚本开始(默认 0)。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_search_scripts Ved Search Scripts
全局搜索:在所有已加载的 JS 源码中搜索字符串。 结果按文件分组,显示每个文件的匹配行数(有上限,见 limit / per_file)。 支持正则(query 以 / 开头和结尾时)。 **零命中时会自动反查**:把 query 按路径片段拆开再搜一遍脚本,并列出已捕获请求里 含这些片段的接口 —— 接口 URL 常是拼接出来的,整串在源码里搜不到。
| Parameter | Type | Description |
|---|---|---|
query * | string | 搜索字符串,或 /regex/ 形式。 |
limit | integer | 最多显示几个文件(默认 5)。 |
per_file | integer | 每个文件最多显示几行(默认 5)。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_script_source Ved Script Source
局部查看:查看某个脚本源码,支持搜索高亮和上下文。 url: 脚本 URL(从 ved_list_scripts 或 ved_search_scripts 获取)。 query: 搜索字符串,匹配行会高亮(>>> 前缀)——压缩成一行的 bundle 用这个,别翻页。 context_lines: 匹配行前后显示几行上下文。 start_line / line_count: 按行翻页(大文件分段读;单行超过 2000 字符会被截断)。 读到任意窗口即视为"已读该脚本":之后才允许在它上面打 JS 观测点(ved_watch 的先读后打)。
| Parameter | Type | Description |
|---|---|---|
url * | string | 脚本 URL。 |
context_lines | integer | 匹配行上下文行数。 |
line_count | integer | 每次显示行数。 |
query | string | 可选搜索字符串。 |
start_line | integer | 起始行(0 = 从头)。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_trace_value Ved Trace Value
全局搜索一个值出现在哪些地方。 搜索范围: JS 源码 → 网络请求 → DOM 内嵌 → 渲染文本 → JS 变量 → WS。 每条匹配标注位置和上下文,支持直接设观测点。
| Parameter | Type | Description |
|---|---|---|
value * | string | 要追踪的值(如 "userid")。 |
tab | string | CDP short ID(空 = 当前激活 tab)。 |
ved_scan Ved Scan
Comprehensive page data source scanner. MODE "all" — full page scan (default): 1. Network APIs — requests captured by the event listener 2. DOM Structure — snapshot tree with repeated-container marks 3. Embedded JSON — script-tag / window-global data records MODE "dom" — keyword-targeted DOM scan: Searches the in-memory DOM tree for the keyword.
| Parameter | Type | Description |
|---|---|---|
keyword | For mode "dom" — search keyword. | |
limit | integer | For mode "dom" — 本次返回条数(默认 30)。 |
mode | string | "all" for full scan, "dom" for keyword-targeted DOM scan. |
offset | integer | For mode "dom" — 从第几处匹配开始(默认 0)。 |
url | For mode "dom" — optional URL to open before scanning. |
ved_chain Ved Chain
工具链:一次把多个工具按顺序交给服务端连续执行。 解决 MCP 回合制的两个硬伤: 1. **别错过** —— 动作与等待/取样在服务端紧挨着跑,中间不经过模型, 瞬时事件(请求/日志/中间态/弹窗)不会被回合间隔吞掉。 2. **给因果** —— 每个动作步骤自动算差分,报告里直接写"+3 requests: …", AI 不用再靠"点前点后各取一次"去猜哪个请求是哪个动作触发的。 步骤(三种写法): {"tool": "ved_act", "args": {"action": "click", "target": "下一页"}} {"wait": {"n…
| Parameter | Type | Description |
|---|---|---|
on_error | string | "stop"(默认)或 "continue"。 |
resume | string | "<chain_id>:<步号>" —— 从该步继续跑同一条链。 |
step_delay_ms | integer | 步间基础延迟(毫秒,另加 0~50% 随机抖动,贴近人的交互节奏)。 |
steps | 步骤列表。不传且 resume 为空时,列出最近执行过的链。 |