{"at":"2026-11-23T05:51:16.594Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:51:18.211Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"veddata","version":"4.2.4"}},"cacheScope":"private","capabilities":{"extensions":{"io.modelcontextprotocol/ui":{}},"logging":{},"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"\nveddata（斥候）是数据源发现工具，不是浏览器。用于分析页面数据来源、捕获 API、\n跟踪数据流。如果你只是要看一个网页，有其他 MCP 工具更合适。\n\nTAB IDs: 所有 tab 用短 ID（前 8 字符，前缀匹配）。\n  ved_tab_switch(\"5FD84E84\") — 切换 tab\n\nRECOMMENDED WORKFLOW:\n  ved_open() -> ved_goto(url)         # 返回 DOM 树 + 数据源清单\n  ved_dom_search(keyword)             # 在内存 DOM 树中定位关键词\n  ved_search(keyword)                 # 跨网络/内嵌/脚本/全局变量搜索\n  ved_trace_value(value)              # 追踪一个值流经的所有位置\n  ved_watch(observations=[...])       # 注册观测点\n  ved_act(\"click\", target=\"加载更多\")  # 触发 → ved_watch(collect=True) 收快照\n  ved_console(code=\"...\")             # 页面内执行 JS 验证\n\n页面访问（ved_goto/ved_fetch）是发现数据的前置步骤，不是功能主体。\n\n写文件的工具（ved_export / ved_export_all / ved_screenshot）需要目标目录：\n启动时用 --response-dir 指定，或本次调用传 output_dir（绝对路径）。\n","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T05:51:18.211Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:51:18.401Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"veddata","version":"4.2.4"}},"cacheScope":"private","resultType":"complete","tools":[{"_meta":{"fastmcp":{"tags":[]}},"description":"启动数据发现会话。打开浏览器以开始捕获页面数据源。浏览网页是前置步骤，不是终点。\n\nLaunches a Playwright Chromium session (persistent context) and clears\nold state.  Does NOT navigate — use ved_goto() for that.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_open","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Open"},{"_meta":{"fastmcp":{"tags":[]}},"description":"导航到目标页面，自动发现所有数据来源。返回 DOM 结构、网络请求、内嵌数据清单。\n\nStarts network monitoring BEFORE navigating (event-driven attach happens\nat tab registration, which precedes goto).\n\nUse new_tab=True to open in a new tab while keeping the current page.","inputSchema":{"additionalProperties":false,"properties":{"depth":{"default":2,"description":"DOM 树深度（默认 2，够看清结构；要细看传 4-8）。","type":"integer"},"limit":{"default":10,"description":"捕获清单预览条数（默认 10；完整清单用 ved_apis 分页取）。","type":"integer"},"new_tab":{"default":false,"description":"True = create new tab; False = navigate current tab.","type":"boolean"},"url":{"description":"Target URL to navigate to.","type":"string"}},"required":["url"],"type":"object"},"name":"ved_goto","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Goto"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Close the browser and clear all captured data.\n\nCloses the Playwright context and resets all state.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_close","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Close"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List all open browser tabs with their URLs — 这是\"重新建档\"的入口。\n\n页面自己跳走、用户开关标签页之后，依赖活状态的工具会被拒绝；\n先调这个（或 ved_status）确认现状，再继续。","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_tabs","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Tabs"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Switch the active tab by CDP short ID (from ved_tabs output).\n\nAfter switching, ved_goto() targets the new tab.","inputSchema":{"additionalProperties":false,"properties":{"tab":{"description":"CDP short ID (first 8 chars, from ved_tabs output).","type":"string"}},"required":["tab"],"type":"object"},"name":"ved_tab_switch","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Tab Switch"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Close browser tab(s) by CDP short ID and prune their API records.\n\n两种写法等价：``tab=\"C724404D,5FD84E84\"``（逗号分隔）或 ``tabs=[\"C724404D\",\"5FD84E84\"]``。\n都不给 = 关闭当前标签。**最后一个标签不会被关掉** —— 全关会让会话没有可用页面\n（要结束会话请用 ved_close）。","inputSchema":{"additionalProperties":false,"properties":{"tab":{"default":"","description":"CDP short ID(s), comma-separated.","type":"string"},"tabs":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"CDP short ID 列表（与 tab 合并处理）。"}},"type":"object"},"name":"ved_tab_close","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Tab Close"},{"_meta":{"fastmcp":{"tags":[]}},"description":"状态体检：现在有哪些标签页、各自在哪个页面、有没有撞上人机门。\n\n用户说\"登录好了 / 验证过了\"之后**先调这个** —— 不要重新导航（会再次触发风控）。\n它同时是一次\"重新建档\"：调过之后依赖活状态的工具才放行。","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_status","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Status"},{"_meta":{"fastmcp":{"tags":[]}},"description":"获取页面全文，辅助定位数据关键词。当需要从页面文本中选取关键词来反查数据时使用。\n\nFirst call scrolls to bottom and writes a JSON cache file.\nSubsequent calls with start_index read from cache (no re-scroll).","inputSchema":{"additionalProperties":false,"properties":{"max_length":{"default":5000,"description":"Characters per chunk (default 5000).","type":"integer"},"start_index":{"default":0,"description":"Start position (default 0).","type":"integer"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"type":"object"},"name":"ved_fetch","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Fetch"},{"_meta":{"fastmcp":{"tags":[]}},"description":"截图当前页面。","inputSchema":{"additionalProperties":false,"properties":{"full_page":{"default":true,"description":"True = 整页，False = 当前视口。","type":"boolean"},"name":{"default":"","description":"可选的文件名前缀（留空则只用站点名+时间戳）。","type":"string"},"output_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"本次落盘目录（绝对路径），覆盖 --response-dir。"}},"type":"object"},"name":"ved_screenshot","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Screenshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"输出当前页面的 DOM 目录树（内存快照，含容器/字段/交互标记）。\n\n首次调用或页面导航后会自动重新扫描；此后从内存读取，不再调浏览器。","inputSchema":{"additionalProperties":false,"properties":{"depth":{"default":2,"description":"树的显示深度（默认 2，够看清结构；要细看传 4-8）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_dom_tree","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Dom Tree"},{"_meta":{"fastmcp":{"tags":[]}},"description":"在内存 DOM 树中搜索文本。\n\n不调浏览器，直接在保存的树结构里查找。返回匹配的节点路径和上下文。","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"description":"搜索关键字（匹配文本/属性/id，大小写不敏感）。","type":"string"},"limit":{"default":30,"description":"本次返回条数（默认 30）。","type":"integer"},"offset":{"default":0,"description":"从第几处匹配开始（默认 0）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"required":["keyword"],"type":"object"},"name":"ved_dom_search","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Dom Search"},{"_meta":{"fastmcp":{"tags":[]}},"description":"通过路径定位一个 DOM 节点。\n\n路径要**从根节点开始**（第一段必须匹配 ``html``）—— 例如\n``html > body.win > div#app > div.feed-card``（可直接从 ved_dom_tree 的输出里抄）。\n段格式：``tag[.class][#id][:nth-child(n)]``，``>`` 分隔。","inputSchema":{"additionalProperties":false,"properties":{"depth":{"default":3,"description":"子树的显示深度（默认 3）。","type":"integer"},"path":{"description":"节点路径（从 html 开始）。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"required":["path"],"type":"object"},"name":"ved_dom_locate","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Dom Locate"},{"_meta":{"fastmcp":{"tags":[]}},"description":"View cookies for the current page.","inputSchema":{"additionalProperties":false,"properties":{"all_domains":{"default":false,"description":"False = current domain only, True = all domains.","type":"boolean"},"all_info":{"default":false,"description":"False = name/value/domain only, True = include path/httpOnly/secure/expires.","type":"boolean"},"filter":{"default":"","description":"逗号分隔的名字片段（大小写不敏感子串），如 \"sessionid,sid_tt,ttwid\"。\n命中时**不裁剪 cookie 值** —— 用来取完整的登录票据。","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"type":"object"},"name":"ved_cookies","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Cookies"},{"_meta":{"fastmcp":{"tags":[]}},"description":"操作页面控制台：执行 JS / 查看 log/warn/error 消息。\n\ncode 非空 → 在页面执行 JS，返回执行结果。\ncode 为空 → 返回控制台历史消息（log/warn/error，来自官方内置缓冲）。\ntail → 只看最近 N 条；filter → 按文本过滤。","inputSchema":{"additionalProperties":false,"properties":{"code":{"default":"","description":"要执行的 JS 代码（空 = 查看历史消息）。","type":"string"},"filter":{"default":"","description":"按文本过滤消息。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"tail":{"default":0,"description":"只看最近 N 条消息（0 = 全部）。","type":"integer"}},"type":"object"},"name":"ved_console","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Console"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Execute actions on the page: input, scroll, click, or select.\n\nTwo modes:\n1. Single step: ved_act(\"scroll\", \"bottom\")\n   ved_act(\"input\", \"python教程\", target=\"搜索\")\n   ved_act(\"click\", target=\"下一页\")\n   ved_act(\"select\", \"最多播放\", target=\"综合排序\")\n   ved_act(\"click\", target=\"css=a[href*='/download/']\")     ← target 也接受选择器\n   ved_act(\"click\", target=\"//a[contains(@href,'/download/')]\")\n\n2. Chain: ved_act(actions=[\n     {\"action\": \"input\", \"value\": \"python教程\", \"target\": \"搜索\"},\n     {\"action\": \"scroll\", \"value\": \"bottom\"},\n     {\"action\": \"click\", \"target\": \"最多播放\"},\n   ])\n\nEach step reports new API method + path inline so AI sees them immediately.\n未命中时给出最接近的可见文本；点击失败时给出错误原文（不再一律说成 not found）。","inputSchema":{"additionalProperties":false,"properties":{"action":{"default":"","description":"\"input\", \"scroll\", \"click\", or \"select\" (single mode).","type":"string"},"actions":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"List of action dicts for chain mode."},"force":{"default":false,"description":"true 时跳过\"状态已变化\"的准入检查 —— 先重新建档，再执行本次动作。\n页面自行跳转（SPA 路由变化）后不必再手动调 ved_status。","type":"boolean"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Visible text of the target element."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Text input or scroll target (bottom/top/down/up/px)."}},"type":"object"},"name":"ved_act","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Act"},{"_meta":{"fastmcp":{"tags":[]}},"description":"列出已捕获的所有数据。包括网络请求、DOM 内嵌数据、JS 变量等。每条记录标注触发时机，不贴类型标签。","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"按 path 或响应体过滤（可选）。"},"limit":{"default":30,"description":"本次返回条数（默认 30）。","type":"integer"},"offset":{"default":0,"description":"从第几条开始（默认 0）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_apis","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Apis"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Show full request and response details for one or more APIs.","inputSchema":{"additionalProperties":false,"properties":{"detail":{"default":"preview","description":"\"preview\" or \"full\".","type":"string"},"index":{"default":0,"description":"API ID (from ved_apis output). Use 0 when using indices.","type":"integer"},"indices":{"default":"","description":"Comma-separated API IDs (e.g. \"2,4\"). Overrides index.","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"type":"object"},"name":"ved_inspect","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Inspect"},{"_meta":{"fastmcp":{"tags":[]}},"description":"在已捕获的所有数据中搜索关键词。包括网络请求、DOM 内嵌 JSON、页面渲染文本和 JS 全局变量。\n\nSupports comma-separated keywords for OR search.","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"description":"Search term, or comma-separated terms for OR logic.","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"required":["keyword"],"type":"object"},"name":"ved_search","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Search"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Search all data sources for keyword, returning field paths and values.","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"description":"Search term, or comma-separated terms for OR logic.","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"required":["keyword"],"type":"object"},"name":"ved_context","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Context"},{"_meta":{"fastmcp":{"tags":[]}},"description":"导出捕获到的 API 数据源（一个或多个）。","inputSchema":{"additionalProperties":false,"properties":{"format":{"default":"both","description":"\"raw\" | \"compact\" | \"both\"（默认 both）。compact 只返回字段文档，不写盘。","type":"string"},"index":{"default":0,"description":"API ID（来自 ved_apis 输出）。用 indices 时传 0。","type":"integer"},"indices":{"default":"","description":"逗号分隔的 API ID（如 \"2,4\"），优先于 index。","type":"string"},"output_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"本次落盘目录（**绝对路径**），覆盖启动参数 --response-dir。"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_export","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Export"},{"_meta":{"fastmcp":{"tags":[]}},"description":"一次导出当前 tab 捕获到的所有 API 数据源。","inputSchema":{"additionalProperties":false,"properties":{"format":{"default":"both","description":"\"raw\" | \"compact\" | \"both\"（默认 both）。compact 只返回字段文档，不写盘。","type":"string"},"output_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"本次落盘目录（**绝对路径**），覆盖启动参数 --response-dir。"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_export_all","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Export All"},{"_meta":{"fastmcp":{"tags":[]}},"description":"快速探测指定 URL 的数据源。打开页面 → 自动捕获 API → 返回字段文档。","inputSchema":{"additionalProperties":false,"properties":{"method":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional HTTP method filter (\"GET\" or \"POST\")."},"path_contains":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional API path filter (e.g. \"/search/notes\")."},"url":{"description":"Target page URL.","type":"string"}},"required":["url"],"type":"object"},"name":"ved_peek","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Peek"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Send a test HTTP request — replay from captured API or fully custom.\n\nThree modes:\n1. Replay: index=3, params='{\"page\":2}' — 用 API #3 的 URL/method/headers 作底，\n   params/headers 在其上**覆盖或删除**。\n2. Manual: url=\"...\", method=\"POST\", body=\"...\" — fully custom。\n3. Raw: index=3, raw=true, headers='{\"cookie\":\"sessionid=...\"}' — 原样发出：\n   不继承捕获记录的头/参数/body，不注入 cookie 与 XSRF，只发你给的东西。\n\n覆盖语义：``params`` / ``headers`` 里 **值为 null 表示删掉该键**，其余为设置/覆盖。\n非 raw 模式下 cookie 默认由浏览器实时同步；你显式给的 ``cookie`` 头优先于它。\n\n返回里会回显**实际发出的请求**（方法、最终 URL、请求头及每个头的来源、参数），\n以及被删除 / 未发送的键 —— 用它可以判断\"哪些东西是必需的\"。","inputSchema":{"additionalProperties":false,"properties":{"body":{"default":"","description":"JSON string of request body.","type":"string"},"headers":{"default":"","description":"JSON string of extra headers; ``null`` 值删除该键。","type":"string"},"index":{"default":0,"description":"API record number to replay (0 = manual mode).","type":"integer"},"method":{"default":"GET","description":"HTTP method (default \"GET\").","type":"string"},"params":{"default":"","description":"JSON string of query parameters; ``null`` 值删除该键。","type":"string"},"raw":{"default":false,"description":"原样发出（见模式 3）。","type":"boolean"},"tab":{"default":"","description":"CDP short ID for cookie sync (empty = current active tab).","type":"string"},"url":{"default":"","description":"Request URL (manual mode).","type":"string"}},"type":"object"},"name":"ved_request","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Request"},{"_meta":{"fastmcp":{"tags":[]}},"description":"批量观测：注册请求/JS 观测点 → 触发操作 → 一次性取回快照。\n\n四种用法（都不传 = 列出当前观测点）：\n  1. 注册：``ved_watch(observations=[{...}, {...}])`` —— 一次可打多个点\n  2. 列表：``ved_watch()`` —— 看 id / 类型 / 目标 / 命中数 / 状态\n  3. 收集：``ved_watch(collect=True)`` —— 等所有点命中（或超时）后返回报告\n  4. 删除：``ved_watch(remove=\"w1,w3\")``，``remove=\"all\"`` 清空\n\nobservation 项：\n  {\"type\": \"request\", \"pattern\": \"/api/*\"}                      — 请求（glob 或 /regex/）\n  {\"type\": \"js\", \"url\": \"...app.js\", \"line\": 147,\n   \"variables\": [\"userid\", \"secret\"]}                          — JS 断点（line 是 **1-based**）\n  可选字段：{\"id\": \"login\", \"max\": 1}\n    id  —— 自定义 id（缺省自动分配 w1/w2…，单调递增、跨批次不重复）\n    max —— 该点最多记几次命中，默认 1；**达到后自动移除该点**（0 = 不限，仍受全局上限）\n\n原理：JS 观测点用的是 CDP ``Debugger.setBreakpointByUrl`` —— 和人工断点同一个接口，\n区别只在命中后自动读值并 resume，不打断页面。但也因此：断点打在热点行会反复中断，\n所以默认只取第一次（要连续观察就调大 max）。\n\n**先读后打**：JS 观测点要求先读过该脚本（``ved_script_source(url=...)``）。没读过会被\n拒绝并提示去读；读完之后脚本变了（页面重载/内容不同）也要重读 —— 否则等于拿旧认知\n在错误的行上设断点。请求观测点不涉及代码，没有这个要求。","inputSchema":{"additionalProperties":false,"properties":{"collect":{"default":false,"description":"True = 等待收集并返回报告（保留观测点；清理用 remove）。","type":"boolean"},"limit":{"default":5,"description":"报告里最多显示几条快照（默认 5）。","type":"integer"},"observations":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"观测点列表。"},"remove":{"default":"","description":"要删除的观测点 id，逗号分隔；\"all\" 表示全部删除。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"timeout":{"default":15.0,"description":"收集超时秒数（默认 15）。","type":"number"}},"type":"object"},"name":"ved_watch","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Watch"},{"_meta":{"fastmcp":{"tags":[]}},"description":"列出页面所有 JS 脚本的 URL、大小和行数。\n\n用于定位目标脚本后传给 ved_script_source。内联的 ``data:`` 脚本**只给摘要** ——\n页面里常有几百 KB 的 wasm/base64，整段吐出来会一次性烧掉大量上下文。","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":30,"description":"本次返回个数（默认 30）。","type":"integer"},"offset":{"default":0,"description":"从第几个脚本开始（默认 0）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_list_scripts","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved List Scripts"},{"_meta":{"fastmcp":{"tags":[]}},"description":"全局搜索：在所有已加载的 JS 源码中搜索字符串。\n\n结果按文件分组，显示每个文件的匹配行数（有上限，见 limit / per_file）。\n支持正则（query 以 / 开头和结尾时）。\n\n**零命中时会自动反查**：把 query 按路径片段拆开再搜一遍脚本，并列出已捕获请求里\n含这些片段的接口 —— 接口 URL 常是拼接出来的，整串在源码里搜不到。","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":5,"description":"最多显示几个文件（默认 5）。","type":"integer"},"per_file":{"default":5,"description":"每个文件最多显示几行（默认 5）。","type":"integer"},"query":{"description":"搜索字符串，或 /regex/ 形式。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"required":["query"],"type":"object"},"name":"ved_search_scripts","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Search Scripts"},{"_meta":{"fastmcp":{"tags":[]}},"description":"局部查看：查看某个脚本源码，支持搜索高亮和上下文。\n\nurl: 脚本 URL（从 ved_list_scripts 或 ved_search_scripts 获取）。\nquery: 搜索字符串，匹配行会高亮（>>> 前缀）——压缩成一行的 bundle 用这个，别翻页。\ncontext_lines: 匹配行前后显示几行上下文。\nstart_line / line_count: 按行翻页（大文件分段读；单行超过 2000 字符会被截断）。\n\n读到任意窗口即视为\"已读该脚本\"：之后才允许在它上面打 JS 观测点（ved_watch 的先读后打）。","inputSchema":{"additionalProperties":false,"properties":{"context_lines":{"default":3,"description":"匹配行上下文行数。","type":"integer"},"line_count":{"default":50,"description":"每次显示行数。","type":"integer"},"query":{"default":"","description":"可选搜索字符串。","type":"string"},"start_line":{"default":0,"description":"起始行（0 = 从头）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"url":{"description":"脚本 URL。","type":"string"}},"required":["url"],"type":"object"},"name":"ved_script_source","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Script Source"},{"_meta":{"fastmcp":{"tags":[]}},"description":"全局搜索一个值出现在哪些地方。\n\n搜索范围: JS 源码 → 网络请求 → DOM 内嵌 → 渲染文本 → JS 变量 → WS。\n每条匹配标注位置和上下文，支持直接设观测点。","inputSchema":{"additionalProperties":false,"properties":{"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"value":{"description":"要追踪的值（如 \"userid\"）。","type":"string"}},"required":["value"],"type":"object"},"name":"ved_trace_value","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Trace Value"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Comprehensive page data source scanner.\n\nMODE \"all\" — full page scan (default):\n  1. Network APIs — requests captured by the event listener\n  2. DOM Structure — snapshot tree with repeated-container marks\n  3. Embedded JSON — script-tag / window-global data records\n\nMODE \"dom\" — keyword-targeted DOM scan:\n  Searches the in-memory DOM tree for the keyword.","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"For mode \"dom\" — search keyword."},"limit":{"default":30,"description":"For mode \"dom\" — 本次返回条数（默认 30）。","type":"integer"},"mode":{"default":"all","description":"\"all\" for full scan, \"dom\" for keyword-targeted DOM scan.","type":"string"},"offset":{"default":0,"description":"For mode \"dom\" — 从第几处匹配开始（默认 0）。","type":"integer"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"For mode \"dom\" — optional URL to open before scanning."}},"type":"object"},"name":"ved_scan","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Scan"},{"_meta":{"fastmcp":{"tags":[]}},"description":"工具链：一次把多个工具按顺序交给服务端连续执行。\n\n解决 MCP 回合制的两个硬伤：\n1. **别错过** —— 动作与等待/取样在服务端紧挨着跑，中间不经过模型，\n   瞬时事件（请求/日志/中间态/弹窗）不会被回合间隔吞掉。\n2. **给因果** —— 每个动作步骤自动算差分，报告里直接写\"+3 requests: …\"，\n   AI 不用再靠\"点前点后各取一次\"去猜哪个请求是哪个动作触发的。\n\n步骤（三种写法）：\n  {\"tool\": \"ved_act\", \"args\": {\"action\": \"click\", \"target\": \"下一页\"}}\n  {\"wait\": {\"network\": \"**/joblist**\", \"timeout\": 8}}\n     wait 支持：ms / network（等指定请求出现）/ network_idle（网络静默）/ element(+state=visible|hidden)\n  {\"repeat\": {\"times\": 5, \"steps\": [ ... ]}}          # 只允许一层，翻页用\n\n典型链路（翻页抓接口：现在 12+ 回合 → 2 回合）：\n  ved_chain(steps=[\n    {\"tool\": \"ved_open\"},\n    {\"tool\": \"ved_goto\", \"args\": {\"url\": \"https://…\"}},\n    {\"tool\": \"ved_watch\", \"args\": {\"observations\": [{\"type\": \"request\", \"pattern\": \"**/api/**\"}]}},\n    {\"tool\": \"ved_act\", \"args\": {\"action\": \"click\", \"target\": \"下一页\"}},\n    {\"wait\": {\"network_idle\": 800, \"timeout\": 10}},\n    {\"tool\": \"ved_watch\", \"args\": {\"collect\": True, \"timeout\": 10}},\n  ])\n\n行为约定：\n  - 撞上登录/验证/风控 → 停在该步；用户处理完用 ved_chain(resume=\"<id>:<步号>\") 续跑，**不重放**前面动作\n  - 状态被工具之外改动（页面自跳 / 用户开标签页）→ 停，并说明原因\n  - 每步都过和单独调用时同一套门禁（链不是后门）\n  - 只允许既有工具里的动作/读取类；ved_close 与 ved_chain 自身禁用\n  - 上限：30 步 / repeat 20 次 / 单步 30s / 整链 300s\n  - 报告每步一行 + 因果差分，细节留服务端（用 ved_apis / ved_inspect / ved_watch(collect) 取）","inputSchema":{"additionalProperties":false,"properties":{"on_error":{"default":"stop","description":"\"stop\"（默认）或 \"continue\"。","type":"string"},"resume":{"default":"","description":"\"<chain_id>:<步号>\" —— 从该步继续跑同一条链。","type":"string"},"step_delay_ms":{"default":0,"description":"步间基础延迟（毫秒，另加 0~50% 随机抖动，贴近人的交互节奏）。","type":"integer"},"steps":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"步骤列表。不传且 resume 为空时，列出最近执行过的链。"}},"type":"object"},"name":"ved_chain","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Chain"}],"ttlMs":0}}}
{"at":"2026-11-23T05:51:18.703Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T05:51:20.285Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"logging":{},"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":false},"tools":{"listChanged":true}},"instructions":"\nveddata（斥候）是数据源发现工具，不是浏览器。用于分析页面数据来源、捕获 API、\n跟踪数据流。如果你只是要看一个网页，有其他 MCP 工具更合适。\n\nTAB IDs: 所有 tab 用短 ID（前 8 字符，前缀匹配）。\n  ved_tab_switch(\"5FD84E84\") — 切换 tab\n\nRECOMMENDED WORKFLOW:\n  ved_open() -> ved_goto(url)         # 返回 DOM 树 + 数据源清单\n  ved_dom_search(keyword)             # 在内存 DOM 树中定位关键词\n  ved_search(keyword)                 # 跨网络/内嵌/脚本/全局变量搜索\n  ved_trace_value(value)              # 追踪一个值流经的所有位置\n  ved_watch(observations=[...])       # 注册观测点\n  ved_act(\"click\", target=\"加载更多\")  # 触发 → ved_watch(collect=True) 收快照\n  ved_console(code=\"...\")             # 页面内执行 JS 验证\n\n页面访问（ved_goto/ved_fetch）是发现数据的前置步骤，不是功能主体。\n\n写文件的工具（ved_export / ved_export_all / ved_screenshot）需要目标目录：\n启动时用 --response-dir 指定，或本次调用传 output_dir（绝对路径）。\n","protocolVersion":"2025-11-25","serverInfo":{"name":"veddata","version":"4.2.4"}}}}
{"at":"2026-11-23T05:51:20.285Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:51:20.285Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:51:20.476Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"_meta":{"fastmcp":{"tags":[]}},"description":"启动数据发现会话。打开浏览器以开始捕获页面数据源。浏览网页是前置步骤，不是终点。\n\nLaunches a Playwright Chromium session (persistent context) and clears\nold state.  Does NOT navigate — use ved_goto() for that.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_open","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Open"},{"_meta":{"fastmcp":{"tags":[]}},"description":"导航到目标页面，自动发现所有数据来源。返回 DOM 结构、网络请求、内嵌数据清单。\n\nStarts network monitoring BEFORE navigating (event-driven attach happens\nat tab registration, which precedes goto).\n\nUse new_tab=True to open in a new tab while keeping the current page.","inputSchema":{"additionalProperties":false,"properties":{"depth":{"default":2,"description":"DOM 树深度（默认 2，够看清结构；要细看传 4-8）。","type":"integer"},"limit":{"default":10,"description":"捕获清单预览条数（默认 10；完整清单用 ved_apis 分页取）。","type":"integer"},"new_tab":{"default":false,"description":"True = create new tab; False = navigate current tab.","type":"boolean"},"url":{"description":"Target URL to navigate to.","type":"string"}},"required":["url"],"type":"object"},"name":"ved_goto","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Goto"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Close the browser and clear all captured data.\n\nCloses the Playwright context and resets all state.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_close","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Close"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List all open browser tabs with their URLs — 这是\"重新建档\"的入口。\n\n页面自己跳走、用户开关标签页之后，依赖活状态的工具会被拒绝；\n先调这个（或 ved_status）确认现状，再继续。","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_tabs","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Tabs"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Switch the active tab by CDP short ID (from ved_tabs output).\n\nAfter switching, ved_goto() targets the new tab.","inputSchema":{"additionalProperties":false,"properties":{"tab":{"description":"CDP short ID (first 8 chars, from ved_tabs output).","type":"string"}},"required":["tab"],"type":"object"},"name":"ved_tab_switch","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Tab Switch"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Close browser tab(s) by CDP short ID and prune their API records.\n\n两种写法等价：``tab=\"C724404D,5FD84E84\"``（逗号分隔）或 ``tabs=[\"C724404D\",\"5FD84E84\"]``。\n都不给 = 关闭当前标签。**最后一个标签不会被关掉** —— 全关会让会话没有可用页面\n（要结束会话请用 ved_close）。","inputSchema":{"additionalProperties":false,"properties":{"tab":{"default":"","description":"CDP short ID(s), comma-separated.","type":"string"},"tabs":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"CDP short ID 列表（与 tab 合并处理）。"}},"type":"object"},"name":"ved_tab_close","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Tab Close"},{"_meta":{"fastmcp":{"tags":[]}},"description":"状态体检：现在有哪些标签页、各自在哪个页面、有没有撞上人机门。\n\n用户说\"登录好了 / 验证过了\"之后**先调这个** —— 不要重新导航（会再次触发风控）。\n它同时是一次\"重新建档\"：调过之后依赖活状态的工具才放行。","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"ved_status","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Status"},{"_meta":{"fastmcp":{"tags":[]}},"description":"获取页面全文，辅助定位数据关键词。当需要从页面文本中选取关键词来反查数据时使用。\n\nFirst call scrolls to bottom and writes a JSON cache file.\nSubsequent calls with start_index read from cache (no re-scroll).","inputSchema":{"additionalProperties":false,"properties":{"max_length":{"default":5000,"description":"Characters per chunk (default 5000).","type":"integer"},"start_index":{"default":0,"description":"Start position (default 0).","type":"integer"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"type":"object"},"name":"ved_fetch","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Fetch"},{"_meta":{"fastmcp":{"tags":[]}},"description":"截图当前页面。","inputSchema":{"additionalProperties":false,"properties":{"full_page":{"default":true,"description":"True = 整页，False = 当前视口。","type":"boolean"},"name":{"default":"","description":"可选的文件名前缀（留空则只用站点名+时间戳）。","type":"string"},"output_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"本次落盘目录（绝对路径），覆盖 --response-dir。"}},"type":"object"},"name":"ved_screenshot","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Screenshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"输出当前页面的 DOM 目录树（内存快照，含容器/字段/交互标记）。\n\n首次调用或页面导航后会自动重新扫描；此后从内存读取，不再调浏览器。","inputSchema":{"additionalProperties":false,"properties":{"depth":{"default":2,"description":"树的显示深度（默认 2，够看清结构；要细看传 4-8）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_dom_tree","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Dom Tree"},{"_meta":{"fastmcp":{"tags":[]}},"description":"在内存 DOM 树中搜索文本。\n\n不调浏览器，直接在保存的树结构里查找。返回匹配的节点路径和上下文。","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"description":"搜索关键字（匹配文本/属性/id，大小写不敏感）。","type":"string"},"limit":{"default":30,"description":"本次返回条数（默认 30）。","type":"integer"},"offset":{"default":0,"description":"从第几处匹配开始（默认 0）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"required":["keyword"],"type":"object"},"name":"ved_dom_search","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Dom Search"},{"_meta":{"fastmcp":{"tags":[]}},"description":"通过路径定位一个 DOM 节点。\n\n路径要**从根节点开始**（第一段必须匹配 ``html``）—— 例如\n``html > body.win > div#app > div.feed-card``（可直接从 ved_dom_tree 的输出里抄）。\n段格式：``tag[.class][#id][:nth-child(n)]``，``>`` 分隔。","inputSchema":{"additionalProperties":false,"properties":{"depth":{"default":3,"description":"子树的显示深度（默认 3）。","type":"integer"},"path":{"description":"节点路径（从 html 开始）。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"required":["path"],"type":"object"},"name":"ved_dom_locate","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Dom Locate"},{"_meta":{"fastmcp":{"tags":[]}},"description":"View cookies for the current page.","inputSchema":{"additionalProperties":false,"properties":{"all_domains":{"default":false,"description":"False = current domain only, True = all domains.","type":"boolean"},"all_info":{"default":false,"description":"False = name/value/domain only, True = include path/httpOnly/secure/expires.","type":"boolean"},"filter":{"default":"","description":"逗号分隔的名字片段（大小写不敏感子串），如 \"sessionid,sid_tt,ttwid\"。\n命中时**不裁剪 cookie 值** —— 用来取完整的登录票据。","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"type":"object"},"name":"ved_cookies","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Cookies"},{"_meta":{"fastmcp":{"tags":[]}},"description":"操作页面控制台：执行 JS / 查看 log/warn/error 消息。\n\ncode 非空 → 在页面执行 JS，返回执行结果。\ncode 为空 → 返回控制台历史消息（log/warn/error，来自官方内置缓冲）。\ntail → 只看最近 N 条；filter → 按文本过滤。","inputSchema":{"additionalProperties":false,"properties":{"code":{"default":"","description":"要执行的 JS 代码（空 = 查看历史消息）。","type":"string"},"filter":{"default":"","description":"按文本过滤消息。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"tail":{"default":0,"description":"只看最近 N 条消息（0 = 全部）。","type":"integer"}},"type":"object"},"name":"ved_console","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Console"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Execute actions on the page: input, scroll, click, or select.\n\nTwo modes:\n1. Single step: ved_act(\"scroll\", \"bottom\")\n   ved_act(\"input\", \"python教程\", target=\"搜索\")\n   ved_act(\"click\", target=\"下一页\")\n   ved_act(\"select\", \"最多播放\", target=\"综合排序\")\n   ved_act(\"click\", target=\"css=a[href*='/download/']\")     ← target 也接受选择器\n   ved_act(\"click\", target=\"//a[contains(@href,'/download/')]\")\n\n2. Chain: ved_act(actions=[\n     {\"action\": \"input\", \"value\": \"python教程\", \"target\": \"搜索\"},\n     {\"action\": \"scroll\", \"value\": \"bottom\"},\n     {\"action\": \"click\", \"target\": \"最多播放\"},\n   ])\n\nEach step reports new API method + path inline so AI sees them immediately.\n未命中时给出最接近的可见文本；点击失败时给出错误原文（不再一律说成 not found）。","inputSchema":{"additionalProperties":false,"properties":{"action":{"default":"","description":"\"input\", \"scroll\", \"click\", or \"select\" (single mode).","type":"string"},"actions":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"List of action dicts for chain mode."},"force":{"default":false,"description":"true 时跳过\"状态已变化\"的准入检查 —— 先重新建档，再执行本次动作。\n页面自行跳转（SPA 路由变化）后不必再手动调 ved_status。","type":"boolean"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Visible text of the target element."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Text input or scroll target (bottom/top/down/up/px)."}},"type":"object"},"name":"ved_act","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Act"},{"_meta":{"fastmcp":{"tags":[]}},"description":"列出已捕获的所有数据。包括网络请求、DOM 内嵌数据、JS 变量等。每条记录标注触发时机，不贴类型标签。","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"按 path 或响应体过滤（可选）。"},"limit":{"default":30,"description":"本次返回条数（默认 30）。","type":"integer"},"offset":{"default":0,"description":"从第几条开始（默认 0）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_apis","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Apis"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Show full request and response details for one or more APIs.","inputSchema":{"additionalProperties":false,"properties":{"detail":{"default":"preview","description":"\"preview\" or \"full\".","type":"string"},"index":{"default":0,"description":"API ID (from ved_apis output). Use 0 when using indices.","type":"integer"},"indices":{"default":"","description":"Comma-separated API IDs (e.g. \"2,4\"). Overrides index.","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"type":"object"},"name":"ved_inspect","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Inspect"},{"_meta":{"fastmcp":{"tags":[]}},"description":"在已捕获的所有数据中搜索关键词。包括网络请求、DOM 内嵌 JSON、页面渲染文本和 JS 全局变量。\n\nSupports comma-separated keywords for OR search.","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"description":"Search term, or comma-separated terms for OR logic.","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"required":["keyword"],"type":"object"},"name":"ved_search","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Search"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Search all data sources for keyword, returning field paths and values.","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"description":"Search term, or comma-separated terms for OR logic.","type":"string"},"tab":{"default":"","description":"CDP short ID (empty = current active tab).","type":"string"}},"required":["keyword"],"type":"object"},"name":"ved_context","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Context"},{"_meta":{"fastmcp":{"tags":[]}},"description":"导出捕获到的 API 数据源（一个或多个）。","inputSchema":{"additionalProperties":false,"properties":{"format":{"default":"both","description":"\"raw\" | \"compact\" | \"both\"（默认 both）。compact 只返回字段文档，不写盘。","type":"string"},"index":{"default":0,"description":"API ID（来自 ved_apis 输出）。用 indices 时传 0。","type":"integer"},"indices":{"default":"","description":"逗号分隔的 API ID（如 \"2,4\"），优先于 index。","type":"string"},"output_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"本次落盘目录（**绝对路径**），覆盖启动参数 --response-dir。"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_export","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Export"},{"_meta":{"fastmcp":{"tags":[]}},"description":"一次导出当前 tab 捕获到的所有 API 数据源。","inputSchema":{"additionalProperties":false,"properties":{"format":{"default":"both","description":"\"raw\" | \"compact\" | \"both\"（默认 both）。compact 只返回字段文档，不写盘。","type":"string"},"output_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"本次落盘目录（**绝对路径**），覆盖启动参数 --response-dir。"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_export_all","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Export All"},{"_meta":{"fastmcp":{"tags":[]}},"description":"快速探测指定 URL 的数据源。打开页面 → 自动捕获 API → 返回字段文档。","inputSchema":{"additionalProperties":false,"properties":{"method":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional HTTP method filter (\"GET\" or \"POST\")."},"path_contains":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional API path filter (e.g. \"/search/notes\")."},"url":{"description":"Target page URL.","type":"string"}},"required":["url"],"type":"object"},"name":"ved_peek","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Peek"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Send a test HTTP request — replay from captured API or fully custom.\n\nThree modes:\n1. Replay: index=3, params='{\"page\":2}' — 用 API #3 的 URL/method/headers 作底，\n   params/headers 在其上**覆盖或删除**。\n2. Manual: url=\"...\", method=\"POST\", body=\"...\" — fully custom。\n3. Raw: index=3, raw=true, headers='{\"cookie\":\"sessionid=...\"}' — 原样发出：\n   不继承捕获记录的头/参数/body，不注入 cookie 与 XSRF，只发你给的东西。\n\n覆盖语义：``params`` / ``headers`` 里 **值为 null 表示删掉该键**，其余为设置/覆盖。\n非 raw 模式下 cookie 默认由浏览器实时同步；你显式给的 ``cookie`` 头优先于它。\n\n返回里会回显**实际发出的请求**（方法、最终 URL、请求头及每个头的来源、参数），\n以及被删除 / 未发送的键 —— 用它可以判断\"哪些东西是必需的\"。","inputSchema":{"additionalProperties":false,"properties":{"body":{"default":"","description":"JSON string of request body.","type":"string"},"headers":{"default":"","description":"JSON string of extra headers; ``null`` 值删除该键。","type":"string"},"index":{"default":0,"description":"API record number to replay (0 = manual mode).","type":"integer"},"method":{"default":"GET","description":"HTTP method (default \"GET\").","type":"string"},"params":{"default":"","description":"JSON string of query parameters; ``null`` 值删除该键。","type":"string"},"raw":{"default":false,"description":"原样发出（见模式 3）。","type":"boolean"},"tab":{"default":"","description":"CDP short ID for cookie sync (empty = current active tab).","type":"string"},"url":{"default":"","description":"Request URL (manual mode).","type":"string"}},"type":"object"},"name":"ved_request","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Request"},{"_meta":{"fastmcp":{"tags":[]}},"description":"批量观测：注册请求/JS 观测点 → 触发操作 → 一次性取回快照。\n\n四种用法（都不传 = 列出当前观测点）：\n  1. 注册：``ved_watch(observations=[{...}, {...}])`` —— 一次可打多个点\n  2. 列表：``ved_watch()`` —— 看 id / 类型 / 目标 / 命中数 / 状态\n  3. 收集：``ved_watch(collect=True)`` —— 等所有点命中（或超时）后返回报告\n  4. 删除：``ved_watch(remove=\"w1,w3\")``，``remove=\"all\"`` 清空\n\nobservation 项：\n  {\"type\": \"request\", \"pattern\": \"/api/*\"}                      — 请求（glob 或 /regex/）\n  {\"type\": \"js\", \"url\": \"...app.js\", \"line\": 147,\n   \"variables\": [\"userid\", \"secret\"]}                          — JS 断点（line 是 **1-based**）\n  可选字段：{\"id\": \"login\", \"max\": 1}\n    id  —— 自定义 id（缺省自动分配 w1/w2…，单调递增、跨批次不重复）\n    max —— 该点最多记几次命中，默认 1；**达到后自动移除该点**（0 = 不限，仍受全局上限）\n\n原理：JS 观测点用的是 CDP ``Debugger.setBreakpointByUrl`` —— 和人工断点同一个接口，\n区别只在命中后自动读值并 resume，不打断页面。但也因此：断点打在热点行会反复中断，\n所以默认只取第一次（要连续观察就调大 max）。\n\n**先读后打**：JS 观测点要求先读过该脚本（``ved_script_source(url=...)``）。没读过会被\n拒绝并提示去读；读完之后脚本变了（页面重载/内容不同）也要重读 —— 否则等于拿旧认知\n在错误的行上设断点。请求观测点不涉及代码，没有这个要求。","inputSchema":{"additionalProperties":false,"properties":{"collect":{"default":false,"description":"True = 等待收集并返回报告（保留观测点；清理用 remove）。","type":"boolean"},"limit":{"default":5,"description":"报告里最多显示几条快照（默认 5）。","type":"integer"},"observations":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"观测点列表。"},"remove":{"default":"","description":"要删除的观测点 id，逗号分隔；\"all\" 表示全部删除。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"timeout":{"default":15.0,"description":"收集超时秒数（默认 15）。","type":"number"}},"type":"object"},"name":"ved_watch","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Watch"},{"_meta":{"fastmcp":{"tags":[]}},"description":"列出页面所有 JS 脚本的 URL、大小和行数。\n\n用于定位目标脚本后传给 ved_script_source。内联的 ``data:`` 脚本**只给摘要** ——\n页面里常有几百 KB 的 wasm/base64，整段吐出来会一次性烧掉大量上下文。","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":30,"description":"本次返回个数（默认 30）。","type":"integer"},"offset":{"default":0,"description":"从第几个脚本开始（默认 0）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"type":"object"},"name":"ved_list_scripts","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved List Scripts"},{"_meta":{"fastmcp":{"tags":[]}},"description":"全局搜索：在所有已加载的 JS 源码中搜索字符串。\n\n结果按文件分组，显示每个文件的匹配行数（有上限，见 limit / per_file）。\n支持正则（query 以 / 开头和结尾时）。\n\n**零命中时会自动反查**：把 query 按路径片段拆开再搜一遍脚本，并列出已捕获请求里\n含这些片段的接口 —— 接口 URL 常是拼接出来的，整串在源码里搜不到。","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":5,"description":"最多显示几个文件（默认 5）。","type":"integer"},"per_file":{"default":5,"description":"每个文件最多显示几行（默认 5）。","type":"integer"},"query":{"description":"搜索字符串，或 /regex/ 形式。","type":"string"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"}},"required":["query"],"type":"object"},"name":"ved_search_scripts","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Search Scripts"},{"_meta":{"fastmcp":{"tags":[]}},"description":"局部查看：查看某个脚本源码，支持搜索高亮和上下文。\n\nurl: 脚本 URL（从 ved_list_scripts 或 ved_search_scripts 获取）。\nquery: 搜索字符串，匹配行会高亮（>>> 前缀）——压缩成一行的 bundle 用这个，别翻页。\ncontext_lines: 匹配行前后显示几行上下文。\nstart_line / line_count: 按行翻页（大文件分段读；单行超过 2000 字符会被截断）。\n\n读到任意窗口即视为\"已读该脚本\"：之后才允许在它上面打 JS 观测点（ved_watch 的先读后打）。","inputSchema":{"additionalProperties":false,"properties":{"context_lines":{"default":3,"description":"匹配行上下文行数。","type":"integer"},"line_count":{"default":50,"description":"每次显示行数。","type":"integer"},"query":{"default":"","description":"可选搜索字符串。","type":"string"},"start_line":{"default":0,"description":"起始行（0 = 从头）。","type":"integer"},"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"url":{"description":"脚本 URL。","type":"string"}},"required":["url"],"type":"object"},"name":"ved_script_source","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Script Source"},{"_meta":{"fastmcp":{"tags":[]}},"description":"全局搜索一个值出现在哪些地方。\n\n搜索范围: JS 源码 → 网络请求 → DOM 内嵌 → 渲染文本 → JS 变量 → WS。\n每条匹配标注位置和上下文，支持直接设观测点。","inputSchema":{"additionalProperties":false,"properties":{"tab":{"default":"","description":"CDP short ID（空 = 当前激活 tab）。","type":"string"},"value":{"description":"要追踪的值（如 \"userid\"）。","type":"string"}},"required":["value"],"type":"object"},"name":"ved_trace_value","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Trace Value"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Comprehensive page data source scanner.\n\nMODE \"all\" — full page scan (default):\n  1. Network APIs — requests captured by the event listener\n  2. DOM Structure — snapshot tree with repeated-container marks\n  3. Embedded JSON — script-tag / window-global data records\n\nMODE \"dom\" — keyword-targeted DOM scan:\n  Searches the in-memory DOM tree for the keyword.","inputSchema":{"additionalProperties":false,"properties":{"keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"For mode \"dom\" — search keyword."},"limit":{"default":30,"description":"For mode \"dom\" — 本次返回条数（默认 30）。","type":"integer"},"mode":{"default":"all","description":"\"all\" for full scan, \"dom\" for keyword-targeted DOM scan.","type":"string"},"offset":{"default":0,"description":"For mode \"dom\" — 从第几处匹配开始（默认 0）。","type":"integer"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"For mode \"dom\" — optional URL to open before scanning."}},"type":"object"},"name":"ved_scan","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Scan"},{"_meta":{"fastmcp":{"tags":[]}},"description":"工具链：一次把多个工具按顺序交给服务端连续执行。\n\n解决 MCP 回合制的两个硬伤：\n1. **别错过** —— 动作与等待/取样在服务端紧挨着跑，中间不经过模型，\n   瞬时事件（请求/日志/中间态/弹窗）不会被回合间隔吞掉。\n2. **给因果** —— 每个动作步骤自动算差分，报告里直接写\"+3 requests: …\"，\n   AI 不用再靠\"点前点后各取一次\"去猜哪个请求是哪个动作触发的。\n\n步骤（三种写法）：\n  {\"tool\": \"ved_act\", \"args\": {\"action\": \"click\", \"target\": \"下一页\"}}\n  {\"wait\": {\"network\": \"**/joblist**\", \"timeout\": 8}}\n     wait 支持：ms / network（等指定请求出现）/ network_idle（网络静默）/ element(+state=visible|hidden)\n  {\"repeat\": {\"times\": 5, \"steps\": [ ... ]}}          # 只允许一层，翻页用\n\n典型链路（翻页抓接口：现在 12+ 回合 → 2 回合）：\n  ved_chain(steps=[\n    {\"tool\": \"ved_open\"},\n    {\"tool\": \"ved_goto\", \"args\": {\"url\": \"https://…\"}},\n    {\"tool\": \"ved_watch\", \"args\": {\"observations\": [{\"type\": \"request\", \"pattern\": \"**/api/**\"}]}},\n    {\"tool\": \"ved_act\", \"args\": {\"action\": \"click\", \"target\": \"下一页\"}},\n    {\"wait\": {\"network_idle\": 800, \"timeout\": 10}},\n    {\"tool\": \"ved_watch\", \"args\": {\"collect\": True, \"timeout\": 10}},\n  ])\n\n行为约定：\n  - 撞上登录/验证/风控 → 停在该步；用户处理完用 ved_chain(resume=\"<id>:<步号>\") 续跑，**不重放**前面动作\n  - 状态被工具之外改动（页面自跳 / 用户开标签页）→ 停，并说明原因\n  - 每步都过和单独调用时同一套门禁（链不是后门）\n  - 只允许既有工具里的动作/读取类；ved_close 与 ved_chain 自身禁用\n  - 上限：30 步 / repeat 20 次 / 单步 30s / 整链 300s\n  - 报告每步一行 + 因果差分，细节留服务端（用 ved_apis / ved_inspect / ved_watch(collect) 取）","inputSchema":{"additionalProperties":false,"properties":{"on_error":{"default":"stop","description":"\"stop\"（默认）或 \"continue\"。","type":"string"},"resume":{"default":"","description":"\"<chain_id>:<步号>\" —— 从该步继续跑同一条链。","type":"string"},"step_delay_ms":{"default":0,"description":"步间基础延迟（毫秒，另加 0~50% 随机抖动，贴近人的交互节奏）。","type":"integer"},"steps":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"步骤列表。不传且 resume 为空时，列出最近执行过的链。"}},"type":"object"},"name":"ved_chain","outputSchema":{"properties":{"result":{"type":"string"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Ved Chain"}]}}}
