Seed host tool image policies#3016
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Internal previewPreview URL: https://mcp-inspector-pr-3016.up.railway.app |
WalkthroughThis PR adds two local helper functions in the SDK host-config seed template module for constructing Changes
Sequence Diagram(s)Not applicable — changes are declarative policy assignments rather than runtime interaction flows. Related PRs: None identified. Suggested labels: sdk, host-config, tests Suggested reviewers: None identified. Poem Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
sdk/src/host-config/templates/seed-host-template.tsOops! Something went wrong! :( ESLint: 8.57.1 YAMLException: Cannot read config file: /sdk/eslint.config.mjs 7 | ...tseslint.configs.recommended, sdk/tests/host-config-seed-host-template.test.tsOops! Something went wrong! :( ESLint: 8.57.1 YAMLException: Cannot read config file: /sdk/eslint.config.mjs 7 | ...tseslint.configs.recommended, Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
sdk/src/host-config/templates/seed-host-template.ts (1)
549-559: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSourcing comments missing for the new tool-image policy blocks.
Every other host-behavior value in this file (CSP directives, capabilities, hostContext) is anchored with a comment citing a live probe, doc reference, or explicit rationale (e.g., the Claude CSP block cites a "live claude.ai inner-iframe response CSP header captured 2026-05-18"). The twelve new
modelVisibleMcpToolResults/mcpToolResultImageRenderingblocks have no such attribution, making it hard for future maintainers to know whether these numbers came from a real client probe, the MCP Apps client-matrix doc, or a guess — and whether they should be revisited when a client's behavior changes.Also applies to: 820-830, 985-995, 1097-1107, 1340-1350, 1448-1458, 1510-1520, 1672-1682, 1825-1835, 1870-1880, 1910-1920, 1952-1962
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@sdk/src/host-config/templates/seed-host-template.ts` around lines 549 - 559, Add sourcing comments above each new modelVisibleMcpToolResults and mcpToolResultImageRendering block in seed-host-template.ts so the chosen tool-image policy values are traceable to a live probe, doc reference, or explicit rationale. Use the existing nearby comment style as a guide and anchor the rationale to the relevant host-specific block names so future maintainers can tell whether the values came from a client probe, the MCP Apps matrix, or a deliberate fallback.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@sdk/src/host-config/templates/seed-host-template.ts`:
- Around line 549-559: Add sourcing comments above each new
modelVisibleMcpToolResults and mcpToolResultImageRendering block in
seed-host-template.ts so the chosen tool-image policy values are traceable to a
live probe, doc reference, or explicit rationale. Use the existing nearby
comment style as a guide and anchor the rationale to the relevant host-specific
block names so future maintainers can tell whether the values came from a client
probe, the MCP Apps matrix, or a deliberate fallback.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 579562f7-7742-4f78-bc5f-5e908dca0919
⛔ Files ignored due to path filters (1)
sdk/tests/__snapshots__/host-config-seed-host-template.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (2)
sdk/src/host-config/templates/seed-host-template.tssdk/tests/host-config-seed-host-template.test.ts
Summary by cubic
Seeded per-host MCP tool-result image visibility and rendering policies into the seed host templates so each client shows images correctly. Adds tests to fix the matrix.
modelVisibleMcpToolResultsandmcpToolResultImageRenderingfor all host templates based on the observed client matrix.Written for commit 6e342eb. Summary will update on new commits.