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

Commit 4510b27

Browse files
committed
chore: generate cli automatically
1 parent dc53fa3 commit 4510b27

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"typecheck": "tsc --noEmit",
1414
"format": "eslint --cache --fix . && prettier --write --cache .",
1515
"check-format": "eslint --cache . && prettier --check --cache .;",
16-
"docs": "npm run build && npm run docs:generate && npm run format",
16+
"docs": "npm run build && npm run docs:generate && npm run cli:generate && npm run format",
1717
"docs:generate": "node --experimental-strip-types scripts/generate-docs.ts",
1818
"start": "npm run build && node build/src/index.js",
1919
"start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/index.js",

src/bin/cliDefinitions.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export const commands: Commands = {
287287
},
288288
lighthouse_audit: {
289289
description:
290-
'Get Lighthouse score and reports for accessibility, SEO and best practices.',
290+
'Get Lighthouse score and reports for accessibility, SEO and best practices. This excludes performance. For performance audits, run performance_start_trace',
291291
category: 'Debugging',
292292
args: {
293293
mode: {
@@ -393,7 +393,8 @@ export const commands: Commands = {
393393
args: {},
394394
},
395395
navigate_page: {
396-
description: 'Navigates the currently selected page to a URL.',
396+
description:
397+
'Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.',
397398
category: 'Navigation automation',
398399
args: {
399400
type: {
@@ -441,7 +442,8 @@ export const commands: Commands = {
441442
},
442443
},
443444
new_page: {
444-
description: 'Creates a new page',
445+
description:
446+
'Open a new tab and load a URL. Use project URL if not specified otherwise.',
445447
category: 'Navigation automation',
446448
args: {
447449
url: {
@@ -496,22 +498,24 @@ export const commands: Commands = {
496498
},
497499
performance_start_trace: {
498500
description:
499-
'Starts a performance trace recording on the selected page. This can be used to look for performance problems and insights to improve the performance of the page. It will also report Core Web Vital (CWV) scores for the page.',
501+
'Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.',
500502
category: 'Performance',
501503
args: {
502504
reload: {
503505
name: 'reload',
504506
type: 'boolean',
505507
description:
506508
'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.',
507-
required: true,
509+
required: false,
510+
default: true,
508511
},
509512
autoStop: {
510513
name: 'autoStop',
511514
type: 'boolean',
512515
description:
513516
'Determines if the trace recording should be automatically stopped.',
514-
required: true,
517+
required: false,
518+
default: true,
515519
},
516520
filePath: {
517521
name: 'filePath',
@@ -524,7 +528,7 @@ export const commands: Commands = {
524528
},
525529
performance_stop_trace: {
526530
description:
527-
'Stops the active performance trace recording on the selected page.',
531+
'Stop the active performance trace recording on the selected webpage.',
528532
category: 'Performance',
529533
args: {
530534
filePath: {

0 commit comments

Comments
 (0)