Skip to content

docs(mcp): clarify artifact filename resolution - #42529

Open
Tim Rogers (timrogers) wants to merge 2 commits into
microsoft:mainfrom
timrogers:fix-42528
Open

docs(mcp): clarify artifact filename resolution#42529
Tim Rogers (timrogers) wants to merge 2 commits into
microsoft:mainfrom
timrogers:fix-42528

Conversation

@timrogers

@timrogers Tim Rogers (timrogers) commented Sep 3, 2026

Copy link
Copy Markdown

Summary

  • Clarify that explicit relative filename values 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.
  • Document that omitting filename generates the default artifact name inside the configured output directory.
  • Add a tool-list contract test for both filename descriptions.

Background

This distinction is surprising when the server is started with an output directory such as:

--output-dir /tmp/playwright-mcp

With that configuration, browser_start_video({ "filename": "site-interaction.webm" }) can write /tmp/site-interaction.webm when 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-generated page-{timestamp}.png under the configured output directory.

The existing screenshot description was particularly misleading because it recommended relative filenames "to stay within the output directory."

Validation

  • Reproduced video and screenshot behavior with real MCP invocations using separate client workspace and output directories.
  • Confirmed explicit relative filenames were written under the client-provided directory and omitted filenames were generated under --output-dir.
  • Added and ran the focused MCP capability test that asserts both published tool descriptions.
  • Ran ESLint on the modified source and test files.

Fixes #42528

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

8288 passed, 1371 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MCP]: Clarify artifact filename resolution in tool descriptions

1 participant