Upgrade rmcp to 1.1.0 and fix compatibility issues#202
Conversation
- Upgraded `rmcp` and `rmcp-macros` from older versions to 1.1.0 in `Cargo.toml` files for `mcp-edit`, `mcp-hello`, `mcp-shell`, `llm`, and `llment`. - Fixed breaking API changes from `rmcp`: - Adjusted `Parameters` imports from `handler::server::tool::Parameters` to `handler::server::wrapper::Parameters`. - Removed explicit generic arguments from `remove_route` calls on `ToolRouter`. - Rewrote struct instantiation for `ServerInfo` to use `Default::default()` and mutating the struct instead of relying on exhaustive initializers. - Updated `CallToolRequestParam` to `CallToolRequestParams` in the `llm` crate to adhere to the new MCP client signature, and adapted the builder API to set parameters correctly. - Adjusted `gemini_rust` to construct `FunctionDeclaration` instances using `serde_json::from_value` as the struct fields are now mostly private. - Ensured all test suites pass via `cargo test`. Co-authored-by: dstoc <539597+dstoc@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ccedb2a63
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Upgraded `rmcp` and `rmcp-macros` from older versions to 1.1.0 in `Cargo.toml` files for `mcp-edit`, `mcp-hello`, `mcp-shell`, `llm`, and `llment`. - Fixed breaking API changes from `rmcp`: - Adjusted `Parameters` imports from `handler::server::tool::Parameters` to `handler::server::wrapper::Parameters`. - Removed explicit generic arguments from `remove_route` calls on `ToolRouter`. - Rewrote struct instantiation for `ServerInfo` to use `Default::default()` and mutating the struct instead of relying on exhaustive initializers. - Updated `CallToolRequestParam` to `CallToolRequestParams` in the `llm` crate to adhere to the new MCP client signature, and adapted the builder API to set parameters correctly. - Adjusted `gemini_rust` to construct `FunctionDeclaration` instances using `serde_json::from_value` as the struct fields are now mostly private. - Cleaned up residual patch scripts and removed `.orig` files. - Ensured all test suites pass via `cargo test`.
Addressed PR feedback to replace hardcoded `if true` logic resulting from a malformed script execution during the `rmcp` 1.1.0 migration. Replaced it with `if !result.content.is_empty()` to accurately check if text content exists, falling back to `structured_content` if required.
Replaced the `.unwrap()` with `?` when deserializing the schema into `FunctionDeclaration` for the Gemini client to gracefully fail and propagate the error to the caller, preventing runtime panics with bad schema data.
Refactored `ServerInfo` instantiation across `mcp-hello`, `mcp-shell`, `mcp-edit`, and `llment` to use the `ServerInfo::new()` constructor available in `rmcp` 1.1.0, rather than relying on mutability with `Default::default()`.
I've successfully identified the issue, which was that
mcp-shellrecently upgraded to an incompatiblermcpversion (0.6.4), breaking the workspace compilation.As requested, I upgraded
rmcpacross all crates to its latest stable release (1.1.0), which had several API breaking changes (private parameters, tool routing changes,CallToolRequestParamdeprecation/redesign,ServerInfoexhaustiveness, etc).I addressed all compiler errors caused by this upgrade in
mcp-edit,mcp-hello,mcp-shell,llm, andllment. All crates now compile, type-check, and format correctly, and the full workspace test suite is passing.PR created automatically by Jules for task 3530221066133007580 started by @dstoc