Skip to content

Review follow-ups for #75: check image content type, test share key stays out of errors - #78

Merged
rahuldotiyer merged 1 commit into
mcp-parity-8196from
mcp-parity-8196-review
Nov 26, 2026
Merged

rahuldotiyer merged 1 commit into
mcp-parity-8196from
mcp-parity-8196-review

Conversation

@rahuldotiyer

Copy link
Copy Markdown
Contributor

Follow-ups to @norbertdurcansk's review of #75. They go through this PR because the repo's default ruleset refuses direct pushes to any existing branch, #75's included. It targets #75's branch, so merging it puts these changes into #75.

  • A downloaded dashboard image whose Content-Type is not image/* now fails and is not saved, so an HTML error or login page never becomes dashboard-<id>.jpg.
  • New TestImageDownloadFailuresKeepTheShareKeyOut covers connection refused, an HTML 200 and a 403. It asserts the error never contains the share key and that no file is written. It fails when the url.Error unwrapping is removed.
  • CallTool now wraps CallToolWithImages.

On the download question: a request to the dashboardImageUrl for prod dashboard 481 with no headers returned 200 image/jpeg (168 KB), so the endpoint works without the API key.

go test ./... and go vet ./... pass.

No visual surface: CLI only.

…ors keep the share key out

Review follow-ups on #75: a 200 that is not an image now fails instead of
being saved as the JPEG; a test covers download failures (connection
refused, HTML page, 403) and asserts the share key never reaches the
error; CallTool now wraps CallToolWithImages.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a2147b-3c2e-76b3-aeaf-0aafbe53d879
@rahuldotiyer
rahuldotiyer merged commit 11dfd43 into mcp-parity-8196 Nov 26, 2026
6 checks passed
rahuldotiyer added a commit that referenced this pull request Nov 26, 2026
…nd dashboard images (#75)

* Add CLI parity for MCP chart descriptions, counter labels, widget edits and dashboard images

core#8196 added these to the Dune MCP server (live in node-1.0.1008).
The CLI now matches them:

- viz create --chart-type/--config now takes --description and sends it
  to generateVisualization (it was rejected before).
- viz update gains --counter-label, and --description now works with
  --chart-type/--config or on its own, through updateVisualization. An
  empty value removes the label or description, as in the MCP.
- dashboard update-widget moves or resizes one widget, or edits a text
  widget's markdown, through updateDashboardWidget, keeping every other
  widget as it is.
- dashboard image saves a JPEG of the whole dashboard through
  getDashboardImage. It fails and lists the visualizations when Dune
  withholds the image for licensed datasets. It never prints the image
  URL, which carries a private dashboard's share key; when the image is
  too large to return inline it downloads it from that URL.

dunemcp.Caller gains CallWithImages so commands can read image blocks.
The chart config help no longer says Dune does not check column names:
the MCP now rejects unknown columns when the query has results.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a2147b-3c2e-76b3-aeaf-0aafbe53d879

* Check the downloaded dashboard image's content type and test that errors keep the share key out (#78)

Review follow-ups on #75: a 200 that is not an image now fails instead of
being saved as the JPEG; a test covers download failures (connection
refused, HTML page, 403) and asserts the share key never reaches the
error; CallTool now wraps CallToolWithImages.


Amp-Thread-ID: https://ampcode.com/threads/T-01a2147b-3c2e-76b3-aeaf-0aafbe53d879

Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
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.

2 participants