Skip to content

Commit b5b87d5

Browse files
Assert ui_get declares app-only visibility
Locks in the _meta.ui.visibility ["app"] contract so a future edit can't silently re-expose the UI data tool to the model. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5698568 commit b5b87d5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pkg/github/ui_tools_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ func Test_UIGet(t *testing.T) {
2929
assert.True(t, tool.Annotations.ReadOnlyHint, "ui_get should be read-only")
3030
assert.Equal(t, MCPAppsFeatureFlag, serverTool.FeatureFlagEnable, "ui_get should be gated on the MCP Apps feature flag")
3131

32+
// ui_get must be app-only so the host hides it from the agent's tool list
33+
// while keeping it callable by the views (MCP Apps 2026-01-26 spec).
34+
ui, ok := tool.Meta["ui"].(map[string]any)
35+
require.True(t, ok, "ui_get should declare _meta.ui")
36+
assert.Equal(t, []string{"app"}, ui["visibility"], "ui_get should be app-only")
37+
3238
// Setup mock data
3339
mockAssignees := []*github.User{
3440
{Login: github.Ptr("user1"), AvatarURL: github.Ptr("https://avatars.githubusercontent.com/u/1")},

0 commit comments

Comments
 (0)