← Back to microsoft/playwright
microsoft / playwright · Issue No. 42511
Follow-up to #42487.
I want to give a screenshot a name and still have it saved in the output directory.
Today those two things are exclusive. If I leave filename out, the file goes to the output directory but gets a timestamp name. If I give it a name, it goes to the working directory instead. There is no way to have both.
A setting in the Playwright MCP config that makes a named file go under outputDir would be enough. Off by default, so nothing changes for anyone who does not turn it on.
{
"outputDir": ".playwright-mcp",
"resolveFilenamesInOutputDir": true
}
(The key name is a placeholder.)
I use the MCP from a coding agent. The working directory is the repository I am editing. The agent names its screenshots, so every screenshot lands at the root of the repository as an untracked file, and I have to clean up after it.
I have two workarounds today. I tell the agent to write .playwright-mcp/shot.png, but it does not follow that on every call. I also have a client-side hook that rewrites the name, but it only works in Claude Code; the same MCP used from another client has the same problem. I would rather the server decide where files go, once, in its own config.
@playwright/mcp 0.0.80
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.