Conversation
… file URI handling
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #790 +/- ##
==========================================
- Coverage 21.96% 21.72% -0.24%
==========================================
Files 94 95 +1
Lines 5987 6062 +75
==========================================
+ Hits 1315 1317 +2
- Misses 4569 4642 +73
Partials 103 103
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Description
This pull request introduces improvements to MCP server handling and path parsing, as well as enhancements to tool option annotations. The most significant changes are the addition of robust file URI parsing for cross-platform compatibility, passing the server version dynamically, and expanding test coverage for new path parsing logic.
MCP server improvements:
StartWithMode, defaulting to"dev"if not provided. This ensures the server reports the correct version in its metadata. (internal/mcpserver/server.go,cmd/azqr/commands/mcpserver.go) [1] [2]Path parsing enhancements:
fileURIToPathfunction to reliably convertfile://URIs to local filesystem paths, handling Unix, Windows (including percent-encoded drive letters), and edge cases. Also added the helperisASCIILetter. (internal/mcpserver/roots.go)getCurrentFolderto use the newfileURIToPathfunction, improving cross-platform folder detection from MCP roots. (internal/mcpserver/roots.go)Testing improvements:
fileURIToPathandisASCIILetterto verify correctness across a variety of URI formats and edge cases. (internal/mcpserver/roots_tests.go)Tool option enhancements:
mcp.WithReadOnlyHintAnnotation(false)andmcp.WithDestructiveHintAnnotation(false)to tool options, improving annotation support for tool capabilities. (internal/mcpserver/tools.go)Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: