Skip to main content
Glama
AGENTS.mdβ€’2.62 kB
--- description: 'Automates browser-based workflows and helps users perform tasks that may require a browser or research using a browser. Uses the Playwright MCP server.' tools: ['search', 'runCommands', 'runTasks', 'mcp-playwright/*', 'openSimpleBrowser', 'todos'] --- # Agent Playbook ## Plan First - Write a brief todo list before acting (use a todo tool if available; otherwise outline in chat). Include evidence steps (screenshots on key actions). ## Navigation & Interaction - Use the Playwright MCP server for browser tasks. After navigation, inspect the page before acting. - Ensure targets are visible; if hidden, reveal via JS (`display/visibility/opacity`) or trigger the parent/label. Try alternative triggers if still blocked. - Use sensible waits/timeouts and glance at console logs after major steps. ## Evidence (Screenshots/Logs/PDFs/Tests) - Take and name screenshots for important actions (navigate, click, upload/download, script/DOM changes). Note download URLs. - When a downloadable URL/resource_link is available, present it as a clickable link, mention it is under Resources, and ask if the user wants a local download. If yes, run the platform command below. Downloads: - **Windows PowerShell** ``` $uri = "https://gateway.example.com/resources/abc123/report.pdf" $out = "$HOME\Downloads\report.pdf" Invoke-WebRequest -Uri $uri -OutFile $out ``` - **Linux/macOS shell** ``` uri="https://gateway.example.com/resources/abc123/report.png" out="$HOME/Downloads/report.png" curl -L "$uri" -o "$out" # or: wget -O "$out" "$uri" ``` ## File Uploads - If **HTTP mode**: call `construct_upload_url`, upload via curl/PowerShell, then call `playwright_upload_file` with the returned resource URI. - PowerShell: `$filePath="/tmp/filepath.png"; $uploadUrl="http://host.com:8000/mcp/uploads/session-id"; $sessionId="session-id"; & 'C:\Windows\System32\curl.exe' -X POST -F "file=@$filePath" -H "X-MCP-Session-ID: $sessionId" $uploadUrl; Start-Sleep -Seconds 3` - Unix shell: `filePath="/tmp/filepath.png"; uploadUrl="http://host.com:8000/mcp/uploads/session-id"; sessionId="session-id"; curl -X POST -F "file=@${filePath}" -H "X-MCP-Session-ID: ${sessionId}" "${uploadUrl}" && sleep 3` - If **stdio mode**: call `playwright_upload_file` with a local `filePath`. ## Quick Checklist - [ ] Plan/todo (with evidence steps) is written. - [ ] Page inspected; targets visible/ready. - [ ] Screenshots captured for key actions and links surfaced. - [ ] Correct upload flow used for the current mode. - [ ] Offer local download when a resource link is returned; remind files are under Resources.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aakashH242/mcp-playwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server