Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables the verify_citations tool in the XtraMCP toolkit by implementing a security context injection mechanism that automatically injects user and project credentials for authentication and authorization.
- Enabled the
verify_citationstool in the frontend configuration - Implemented security context injection to automatically provide
user_idandproject_idparameters - Added schema filtering to hide security parameters from the LLM
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
webapp/_webapp/src/components/message-entry-container/tools/tools.tsx |
Uncommented verify_citations to enable the tool in the frontend |
internal/services/toolkit/tools/xtramcp/tool_v2.go |
Added security context injection logic with authentication and authorization checks (v2) |
internal/services/toolkit/tools/xtramcp/tool.go |
Added security context injection logic with authentication and authorization checks (v1) |
internal/services/toolkit/tools/xtramcp/schema_filter.go |
New file implementing schema filtering to remove security parameters from LLM-visible schemas |
internal/services/toolkit/tools/xtramcp/loader_v2.go |
Modified to detect tools requiring injection and pass the flag during tool creation (v2) |
internal/services/toolkit/tools/xtramcp/loader.go |
Modified to detect tools requiring injection and pass the flag during tool creation (v1) |
internal/services/toolkit/client/utils_v2.go |
Updated logging prefixes for consistency |
internal/services/toolkit/client/utils.go |
Updated logging prefixes for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Junyi-99
requested changes
Jan 4, 2026
Member
Junyi-99
left a comment
There was a problem hiding this comment.
To avoid duplicated logic, please remove the corresponding implementation from the v1 APIs and implement the new feature only in the v2 APIs.
(Since xtramcp was not enabled in previous versions, we can simply throw an exception in the v1 APIs without implementing it.)
Junyi-99
approved these changes
Jan 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supports
XtraMCPtool on validating citations and references used across an Overleaf project.Note: This PR also added v2 api integration for xtramcp but it is currently commented and will be propsoed for enabling in the next PR when improving the MCP client workflow. That PR will introduce
displayandinterprettypes for XtraMCP tools where the former will skip MCP client response and display results verbatim whereas the latter allows the client to interpret and display.