Skip to content

Store tool icons in the tool surface snapshot - #31

Merged
ShmueLior merged 3 commits into
mainfrom
feat/snapshot-icons
Dec 4, 2026
Merged

ShmueLior merged 3 commits into
mainfrom
feat/snapshot-icons

Conversation

@ShmueLior

Copy link
Copy Markdown
Owner

Store tool icons in the tool surface snapshot

Tool snapshots now keep each tool's icons (src, plus optional mimeType, sizes and theme). formatVersion stays 1. When a tool has no icons the field is left out, so existing snapshot files stay byte-identical (checked with the WeatherServer snapshot against main).

  • New IconContract on ToolContract.Icons, in server order.
  • New change kind IconsChanged (non-breaking, appended at the end of the enum).
  • data: icons are stored as declared. Diff messages shorten them to data:<mime>;base64,... (N bytes).
  • Reading: missing or empty icons means no icons. "icons": null, a non-array, or an icon without a non-empty src is an error. Unknown icon properties are ignored.
  • An icon without a src from a live server is left out of the snapshot, so the file can always be read back.

Tests: full suite 1452 passed on net8.0 and net10.0, Release, 0 warnings. Rebased onto main after PR #30 (F14). IconsChanged / icons-changed is in the JSON and SARIF reports and in docs/mcpprobe-report.schema.json.

This branch was rebased onto main (c4485b3). The only rebase conflict was CHANGELOG; both sides were kept (icons bullet first, then the F14, F15 and F16 bullets).

Likely remaining conflicts:

Keep formatVersion 1 and omit icons when a tool has none, so existing snapshot files stay the same. Icon changes are non-breaking.
The report format already lists every tool-surface change kind. This adds icons-changed so an icon diff is valid JSON and has a SARIF rule.
@ShmueLior
ShmueLior merged commit 17b5f8c into main Dec 4, 2026
3 checks passed
ShmueLior added a commit that referenced this pull request Dec 4, 2026
Keep the prompt-lint CHANGELOG bullet and the icons bullet from #31, and keep both the prompt/fingerprint tests and DiffJson_IconChange_IsIconsChanged.
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.

1 participant