Chrome DevTools for coding agents
chore: refactor docs generating (#55)
Sebastian Benz0c7daa0b866b
diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.ymlindex 9f85a4ed..b7faaf61 100644--- a/.github/workflows/presubmit.yml+++ b/.github/workflows/presubmit.yml@@ -49,7 +49,7 @@ jobs:run: npm ci- name: Generate documents- run: npm run generate-docs && npm run format+ run: npm run docs- name: Check if autogenerated docs differrun: |diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 1b3ae6a1..80a40c05 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -81,3 +81,7 @@ npx @modelcontextprotocol/inspector node build/src/index.js --log-file=/your/des```You can use the `DEBUG` environment variable as usual to control categories that are logged.++### 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.diff --git a/docs/tool-reference.md b/docs/tool-reference.mdindex 40854d34..7a4a2b5d 100644--- a/docs/tool-reference.md+++ b/docs/tool-reference.md@@ -1,4 +1,4 @@-<!-- AUTO GENERATED DO NOT EDIT - run 'npm run generate-docs' to update-->+<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update--># Chrome DevTools MCP Tool Referencediff --git a/package.json b/package.jsonindex de30968a..f8b61e1e 100644--- a/package.json+++ b/package.json@@ -12,7 +12,8 @@"typecheck": "tsc --noEmit","format": "eslint --cache --fix . ;prettier --write --cache .","check-format": "eslint --cache .; prettier --check --cache .;",- "generate-docs": "npm run build && node --experimental-strip-types scripts/generate-docs.ts",+ "docs": "npm run build && npm run docs: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","test": "npm run build && node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test 'build/tests/**/*.test.js'",diff --git a/scripts/generate-docs.ts b/scripts/generate-docs.tsindex 10443599..d42db530 100644--- a/scripts/generate-docs.ts+++ b/scripts/generate-docs.ts@@ -190,7 +190,7 @@ async function generateToolDocumentation(): Promise<void> {console.log(`Found ${tools.length} tools`);// Generate markdown documentation- let markdown = `<!-- AUTO GENERATED DO NOT EDIT - run 'npm run generate-docs' to update-->+ let markdown = `<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update--># Chrome DevTools MCP Tool Reference