From 76a54df7c4f81e3a85f13eeb8ce1e686e741fce6 Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Thu, 22 Jan 2026 14:53:56 +0000 Subject: [PATCH] docs(playwriter): update OpenCode config with correct npx format - Add -y flag to auto-confirm package installation - Use full path to npx for reliability - Add per-agent tool enabling example - Document token optimization strategy --- .agent/tools/browser/playwriter.md | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.agent/tools/browser/playwriter.md b/.agent/tools/browser/playwriter.md index f667526da..40f4c6b5d 100644 --- a/.agent/tools/browser/playwriter.md +++ b/.agent/tools/browser/playwriter.md @@ -59,12 +59,14 @@ Add to your MCP client configuration: "mcp": { "playwriter": { "type": "local", - "command": ["npx", "playwriter@latest"], + "command": ["/opt/homebrew/bin/npx", "-y", "playwriter@latest"], "enabled": true } } } -```text +``` + +> **Note**: Use full path to `npx` (e.g., `/opt/homebrew/bin/npx` on macOS with Homebrew) for reliability. The `-y` flag auto-confirms package installation. **Claude Desktop** (`claude_desktop_config.json`): @@ -73,11 +75,30 @@ Add to your MCP client configuration: "mcpServers": { "playwriter": { "command": "npx", - "args": ["playwriter@latest"] + "args": ["-y", "playwriter@latest"] } } } -```text +``` + +**Enable per-agent** (OpenCode tools section): + +```json +{ + "tools": { + "playwriter_*": false + }, + "agent": { + "Build+": { + "tools": { + "playwriter_*": true + } + } + } +} +``` + +> **Tip**: Disable globally with `"playwriter_*": false` in `tools`, then enable per-agent to reduce context token usage. ## Usage