Expose a per-server snapshot rendering hook with page and snapshot identity
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api, backend-api-design
Research direction
Start by reading src/McpResponse.ts and src/formatters/SnapshotFormatter.ts, then trace explicit and automatically included snapshot response paths. Define the supported per-server rendering boundary and its page/snapshot continuation state, while preserving default output, structured/text consistency, redaction ordering, and unchanged file-export behavior. Validate the listed acceptance checks with long synthetic snapshots and page or reconnect changes.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
An embedder that needs bounded, redacted accessibility snapshots currently has to customize internal response methods. Customizing take_snapshot alone does not cover snapshots included by other tools, such as wait_for or input actions when a snapshot is requested.
In 1.8.0 and the inspected current main (a918b7b4086bcb14105b80abab1deb882535f15e), McpResponse privately associates the page with snapshot generation. The public format method receives a SnapshotFormatter, whose underlying snapshot is also private. An embedder cannot use that method alone to associate a bounded excerpt with the exact page/snapshot for later continuation.
Post-processing only the final text is insufficient: structured output can still duplicate the full tree, and truncating before redaction can split a value so the later exact-value redactor no longer recognizes it.
Describe the solution you'd like
An opt-in, per-server snapshot-rendering extension point after sampling and before MCP response serialization. The exact interface is open for discussion. It should let a trusted embedder:
- Associate output with the exact page and immutable snapshot identity used by that response, without parsing formatted UID text or sampling the page again.
- Render bounded text and the corresponding structured output consistently for both explicit and automatically included snapshots. Redaction can then happen before excerpt boundaries are chosen, with no hidden full-tree duplicate in structured output.
- Distinguish response rendering from full snapshot file export. A response-size policy must not silently truncate exported files or bypass the existing file-root validator.
- Keep extension state local to one server and invalidate continuation state when the relevant snapshot/context changes.
The redactor, excerpt cache and continuation policy can remain embedder-owned; this does not request a generic caching or secret-management framework upstream. A supported native bounded-snapshot interface could also meet the need if it preserves these distinctions.
Suggested acceptance checks: default output unchanged; long synthetic snapshots are bounded in both response forms; values crossing an excerpt boundary are redacted before slicing; continuation refers to the same snapshot without UID reassignment; page/reconnect changes cannot reuse stale continuation state; full file exports and file refusals remain unchanged.
Describe alternatives you've considered
- Customize only
take_snapshot: misses snapshots generated through other tools. - Disable automatic snapshots: useful and already supported for input tools, but some workflows still need a bounded observation after an action.
- Rewrite final response strings or override
McpResponse.setPage/handleand formatter internals: introduces coupling to output layout and private state. - Request only a subtree: helps size, but is a separate selection feature and does not address consistent rendering/redaction across all response paths.
Additional context
Related embedding request: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2687. Tool registration and snapshot rendering can be designed and delivered independently.
Sources: McpResponse, SnapshotFormatter.
Related: #716 requests subtree selection; #726 added control of input-tool snapshots; #835 concerns snapshot diffs. PR #833 proposed size/selector options and was closed as stale without merging. This request concerns a supported programmatic rendering boundary for embedders, rather than reopening those CLI/tool-parameter proposals.
This is an API-design request based on source inspection and downstream requirements, not a claim that a new upstream implementation has been tested.
- Dominant language
- TypeScript
- Stars
- 59.8k
- Forks
- 4.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 162
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ChromeDevTools/chrome-devtools-mcp
-
feature
Difficulty 1/5 Under an hour Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#3689 ·
Maintainers usually reply within 1 day
-
`evaluate_script` `sourcePath` http(s) URLs are mangled into `file://` pathsMay be free again A pull request for this issue was closed without being merged. Opencollecting-feedback
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#3453 · 3 comments ·
Maintainers usually reply within 1 day
-
collecting-feedback feature
Difficulty 2/5 Half a day Newbie friendliness 76/100
ChromeDevTools/chrome-devtools-mcp#3225 · 3 comments ·
Maintainers usually reply within 1 day
-
confirmed p3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#2947 · 1 comment ·
Maintainers usually reply within 1 day
-
Project Migration: Moving to devtools-frontendPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
ChromeDevTools/chrome-devtools-mcp#3648 ·
Maintainers usually reply within 1 day
All issues in ChromeDevTools/chrome-devtools-mcp
Similar issues
-
bug from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nightly-labs/openbot#21303 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ADORSYS-GIS/CoopData#282 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OHDSI/Data2Evidence#3816 ·
Maintainers usually reply within 3 days
-
`ovsx verify` fails for a version older than the 100 newest of an extensionPossibly taken @trivikr claimed this today. Opencli
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
eclipse-openvsx/openvsx#2482 · 2 comments ·
Maintainers usually reply within 1 day
-
bug builder-vite hmr sev:S3
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
storybookjs/storybook#37965 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day