Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Generate documents
run: npm run docs
- name: Generate
run: npm run gen

- name: Check if autogenerated docs differ
- name: Check if autogenerated code and docs are out of date
run: |
diff_file=$(mktemp doc_diff_XXXXXX)
git diff --color > $diff_file
if [[ -s $diff_file ]]; then
echo "Please update the documentation by running 'npm run generate-docs'. The following was the diff"
echo "Please update the documentation by running 'npm run gen'. The following was the diff"
cat $diff_file
rm $diff_file
exit 1
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ You can use the `DEBUG` environment variable as usual to control categories that

### Updating documentation

When adding a new tool or updating a tool name or description, make sure to run `npm run docs` to generate the tool reference documentation.
When adding a new tool or updating a tool name or description, make sure to run `npm run gen` to generate the tool reference documentation.

### Contributing to Evals

Expand Down
2 changes: 1 addition & 1 deletion docs/slim-tool-reference.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update-->
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run gen' to update-->

# Chrome DevTools MCP Slim Tool Reference (~359 cl100k_base tokens)

Expand Down
2 changes: 1 addition & 1 deletion docs/tool-reference.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update-->
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run gen' to update-->

# Chrome DevTools MCP Tool Reference (~6940 cl100k_base tokens)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"typecheck": "tsc --noEmit",
"format": "eslint --cache --fix . && prettier --write --cache .",
"check-format": "eslint --cache . && prettier --check --cache .;",
"docs": "npm run build && npm run docs:generate && npm run format",
"gen": "npm run build && npm run docs:generate && npm run cli:generate && npm run format",
"docs:generate": "node --experimental-strip-types scripts/generate-docs.ts",
"start": "npm run build && node build/src/index.js",
"start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async function generateReference(
console.log(`Found ${toolsWithAnnotations.length} tools`);

// Generate markdown documentation
let markdown = `<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update-->
let markdown = `<!-- AUTO GENERATED DO NOT EDIT - run 'npm run gen' to update-->

# ${title} (~${(await measureServer(serverArgs)).tokenCount} cl100k_base tokens)

Expand Down
18 changes: 11 additions & 7 deletions src/bin/cliDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const commands: Commands = {
},
lighthouse_audit: {
description:
'Get Lighthouse score and reports for accessibility, SEO and best practices.',
'Get Lighthouse score and reports for accessibility, SEO and best practices. This excludes performance. For performance audits, run performance_start_trace',
category: 'Debugging',
args: {
mode: {
Expand Down Expand Up @@ -393,7 +393,8 @@ export const commands: Commands = {
args: {},
},
navigate_page: {
description: 'Navigates the currently selected page to a URL.',
description:
'Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.',
category: 'Navigation automation',
args: {
type: {
Expand Down Expand Up @@ -441,7 +442,8 @@ export const commands: Commands = {
},
},
new_page: {
description: 'Creates a new page',
description:
'Open a new tab and load a URL. Use project URL if not specified otherwise.',
category: 'Navigation automation',
args: {
url: {
Expand Down Expand Up @@ -496,22 +498,24 @@ export const commands: Commands = {
},
performance_start_trace: {
description:
'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.',
'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.',
category: 'Performance',
args: {
reload: {
name: 'reload',
type: 'boolean',
description:
'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.',
required: true,
required: false,
default: true,
},
autoStop: {
name: 'autoStop',
type: 'boolean',
description:
'Determines if the trace recording should be automatically stopped.',
required: true,
required: false,
default: true,
},
filePath: {
name: 'filePath',
Expand All @@ -524,7 +528,7 @@ export const commands: Commands = {
},
performance_stop_trace: {
description:
'Stops the active performance trace recording on the selected page.',
'Stop the active performance trace recording on the selected webpage.',
category: 'Performance',
args: {
filePath: {
Expand Down
Loading