MCP Apps with extra functionality#1974
Conversation
…ce CreateIssueApp to manage existing issue data
…server into mcp-ui-apps-3
# Conflicts: # ui/src/apps/issue-write/App.tsx # ui/src/apps/pr-write/App.tsx
Resolved the merge conflicts with |
ui_get backs only the MCP App views and has no business in the agent's tool list. Per the MCP Apps 2026-01-26 spec, omitting _meta.ui.visibility defaults to ["model","app"], which exposes the tool to the model. Declare visibility ["app"] so the host hides it from tools/list while the views can still invoke it via tools/call. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerated via UPDATE_TOOLSNAPS to capture the new _meta.ui.visibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
Regenerated docs/feature-flags.md and docs/insiders-features.md to include the ui_get tool entry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Paginate the labels GraphQL query (cursor-based) so repos with more than 100 labels return a complete list instead of silently truncating. - Emit an empty due_on for milestones without a due date instead of formatting the zero time as "0001-01-01". - Use NewGitHubAPIErrorResponse in uiGetIssueTypes to preserve GitHub response context, matching the other REST-backed methods. - Extend tests to cover the labels (GraphQL), milestones (including the no-due-date case) and issue_types methods, plus the issue_types error path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Re-initialize selectedRepo from toolInput inside the reset-on-invocation effect instead of a separate effect. The two effects both depended on toolInput and ran in declaration order, so the reset wiped the just- initialized repo and the picker never reflected the invocation's owner/repo. - Set the default base branch with a functional update in pr-write so a base prefilled from toolInput.base (or chosen by the user) isn't overwritten by a stale baseBranch value captured before the branches request resolved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| for { | ||
| assignees, resp, err := client.Issues.ListAssignees(ctx, owner, repo, opts) | ||
| if err != nil { | ||
| return ghErrors.NewGitHubAPIErrorResponse(ctx, "failed to list assignees", resp, err), nil, nil | ||
| } | ||
| allAssignees = append(allAssignees, assignees...) | ||
| if resp.NextPage == 0 { | ||
| break | ||
| } | ||
| opts.Page = resp.NextPage | ||
| } |
| for { | ||
| milestones, resp, err := client.Issues.ListMilestones(ctx, owner, repo, opts) | ||
| if err != nil { | ||
| return ghErrors.NewGitHubAPIErrorResponse(ctx, "failed to list milestones", resp, err), nil, nil | ||
| } | ||
| allMilestones = append(allMilestones, milestones...) | ||
| if resp.NextPage == 0 { | ||
| break | ||
| } | ||
| opts.Page = resp.NextPage | ||
| } |
| for { | ||
| branches, resp, err := client.Repositories.ListBranches(ctx, owner, repo, opts) | ||
| if err != nil { | ||
| return ghErrors.NewGitHubAPIErrorResponse(ctx, "failed to list branches", resp, err), nil, nil | ||
| } | ||
| allBranches = append(allBranches, branches...) | ||
| if resp.NextPage == 0 { | ||
| break | ||
| } | ||
| opts.Page = resp.NextPage | ||
| } |
- issue-write: derive owner/name from full_name since search_repositories minimal output omits the owner object (mirrors pr-write) - pr-write/issue-write: clear available branch/label/assignee/milestone/type lists and filters in the toolInput reset effect so prefill effects can't match against the previous repo's stale data Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # ui/src/apps/issue-write/App.tsx # ui/src/apps/pr-write/App.tsx
Resolved the merge conflicts with |
Summary
This pull request introduces a new backend tool for fetching UI-related repository data and integrates it into the PR creation UI, enabling dynamic branch selection and repository search. It also includes comprehensive tests for the new tool.
Why
Expands on #1957
Closes https://github.com/github/copilot-mcp-core/issues/1754
What changed
Backend: UI Data Fetch Tool
ui_gettool to provide UI data (labels, assignees, milestones, issue types, branches) for MCP Apps, including its schema and logic for fetching data using GitHub APIs. [1] [2]ui_gettool into the server toolset, making it available as an insiders-only feature.ui_getas app-only (_meta.ui.visibility: ["app"]) per the MCP Apps 2026-01-26 spec, so the host keeps it out of the agent's tool list while the bundled MCP App views can still call it viatools/call.Frontend: Pull Request Creation UI Enhancements
ui_gettool. [1] [2]MCP impact
Prompts tested (tool changes only)
Security / limits
ui_getis declared app-only (_meta.ui.visibility: ["app"]), so the host does not expose it in the agent's tool list; it is callable only by the bundled MCP App views viatools/call. It is read-only and gated behind the insiders MCP Apps feature flag.Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint./script/testDocs