Skip to content

fix: hide write UI resources in read-only mode#2581

Open
he-yufeng wants to merge 1 commit into
github:mainfrom
he-yufeng:fix/read-only-ui-resources-v3
Open

fix: hide write UI resources in read-only mode#2581
he-yufeng wants to merge 1 commit into
github:mainfrom
he-yufeng:fix/read-only-ui-resources-v3

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • pass the server read-only setting into MCP App UI resource registration
  • keep the read-only get_me_ui resource available
  • skip issue_write_ui and pr_write_ui when write tools are filtered by --read-only

Fixes #2519.

To verify

  • go test ./pkg/github -run "TestRegisterUIResources_ReadOnlySkipsWriteResources|TestRegisterUIResources_ReadableViaClient|TestNewMCPServer_RegistersUIResources" -count=1
  • go test ./pkg/github -count=1
  • git diff --check

@he-yufeng he-yufeng requested a review from a team as a code owner May 30, 2026 18:30
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 App UI resources for write tools are registered in --read-only mode

1 participant