Skip to content

Commit 5b52f35

Browse files
author
Natallia Harshunova
committed
Hide extensions from docs
1 parent b21e787 commit 5b52f35

3 files changed

Lines changed: 8 additions & 18 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,6 @@ If you run into any issues, checkout our [troubleshooting guide](./docs/troubles
360360
- [`list_console_messages`](docs/tool-reference.md#list_console_messages)
361361
- [`take_screenshot`](docs/tool-reference.md#take_screenshot)
362362
- [`take_snapshot`](docs/tool-reference.md#take_snapshot)
363-
- **Extensions** (1 tools)
364-
- [`install_extension`](docs/tool-reference.md#install_extension)
365363

366364
<!-- END AUTO GENERATED TOOLS -->
367365

docs/tool-reference.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
- [`list_console_messages`](#list_console_messages)
3535
- [`take_screenshot`](#take_screenshot)
3636
- [`take_snapshot`](#take_snapshot)
37-
- **[Extensions](#extensions)** (1 tools)
38-
- [`install_extension`](#install_extension)
3937

4038
## Input automation
4139

@@ -285,12 +283,12 @@ so returned values have to JSON-serializable.
285283
**Parameters:**
286284

287285
- **function** (string) **(required)**: A JavaScript function declaration to be executed by the tool in the currently selected page.
288-
Example without arguments: `() => {
286+
Example without arguments: `() => {
289287
return document.title
290288
}` or `async () => {
291289
return await fetch("example.com")
292290
}`.
293-
Example with arguments: `(el) => {
291+
Example with arguments: `(el) => {
294292
return el.innerText;
295293
}`
296294

@@ -347,15 +345,3 @@ in the DevTools Elements panel (if any).
347345
- **verbose** (boolean) _(optional)_: Whether to include all possible information available in the full a11y tree. Default is false.
348346

349347
---
350-
351-
## Extensions
352-
353-
### `install_extension`
354-
355-
**Description:** Installs a Chrome extension from the given path.
356-
357-
**Parameters:**
358-
359-
- **path** (string) **(required)**: Absolute path to the unpacked extension folder.
360-
361-
---

scripts/generate-docs.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@ async function generateToolDocumentation(): Promise<void> {
281281
if (!tool.annotations.conditions) {
282282
return true;
283283
}
284+
285+
// Filter out extension tools
286+
if (tool.name === 'install_extension') {
287+
return false;
288+
}
289+
284290
// Only include unconditional tools.
285291
return tool.annotations.conditions.length === 0;
286292
})

0 commit comments

Comments
 (0)