豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit dfa9b79

Browse files
authored
refactor: set defaults to performance trace tool (#1090)
Defaults make it easier to use.
1 parent 92f2c7b commit dfa9b79

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/tool-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update-->
22

3-
# Chrome DevTools MCP Tool Reference (~6919 cl100k_base tokens)
3+
# Chrome DevTools MCP Tool Reference (~6915 cl100k_base tokens)
44

55
- **[Input automation](#input-automation)** (9 tools)
66
- [`click`](#click)
@@ -260,9 +260,9 @@
260260

261261
**Parameters:**
262262

263-
- **autoStop** (boolean) **(required)**: Determines if the trace recording should be automatically stopped.
264-
- **reload** (boolean) **(required)**: Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the [`navigate_page`](#navigate_page) tool BEFORE starting the trace if reload or autoStop is set to true.
263+
- **autoStop** (boolean) _(optional)_: Determines if the trace recording should be automatically stopped.
265264
- **filePath** (string) _(optional)_: The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed).
265+
- **reload** (boolean) _(optional)_: Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the [`navigate_page`](#navigate_page) tool BEFORE starting the trace if reload or autoStop is set to true.
266266

267267
---
268268

src/tools/performance.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ export const startTrace = definePageTool({
3636
schema: {
3737
reload: zod
3838
.boolean()
39+
.default(true)
3940
.describe(
4041
'Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the navigate_page tool BEFORE starting the trace if reload or autoStop is set to true.',
4142
),
4243
autoStop: zod
4344
.boolean()
45+
.default(true)
4446
.describe(
4547
'Determines if the trace recording should be automatically stopped.',
4648
),

0 commit comments

Comments
 (0)