docs(mcp): clarify artifact filename resolution - #42529
Open
Tim Rogers (timrogers) wants to merge 2 commits into
Open
docs(mcp): clarify artifact filename resolution#42529Tim Rogers (timrogers) wants to merge 2 commits into
Tim Rogers (timrogers) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Test results for "MCP"8288 passed, 1371 skipped Merge workflow run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
filenamevalues for screenshots and videos are resolved against the directory provided by the MCP client (or the server working directory as a fallback), not the configured output directory.filenamegenerates the default artifact name inside the configured output directory.Background
This distinction is surprising when the server is started with an output directory such as:
With that configuration,
browser_start_video({ "filename": "site-interaction.webm" })can write/tmp/site-interaction.webmwhen the directory provided by the MCP client is/tmp, rather than/tmp/playwright-mcp/site-interaction.webm.Screenshots follow the same shared resolution behavior:
browser_take_screenshot({ "filename": "named.png" })writes the explicit relative filename under the directory provided by the client.browser_take_screenshot({})writes an auto-generatedpage-{timestamp}.pngunder the configured output directory.The existing screenshot description was particularly misleading because it recommended relative filenames "to stay within the output directory."
Validation
--output-dir.Fixes #42528