Commit 65a6e03
deps: upgrade rmcp/rmcp-macros 0.6 -> 1.7 with API migration
rmcp 1.x made several MCP model result structs #[non_exhaustive] and
added new fields (e.g. `_meta`), which broke the existing struct-literal
construction in the MCP server. Migrate all construction sites to the
crate's constructors/builders while preserving behavior exactly:
- CallToolResult (now #[non_exhaustive]): replace struct literals with
CallToolResult::success(content) + assign .structured_content; keeps
same content, is_error=Some(false), structured_content, meta=None.
- Tool (now #[non_exhaustive], +execution/+meta fields): use
Tool::new(name, description, input_schema).with_title(title).
- ListToolsResult (+_meta field): use ListToolsResult::with_all_items(tools)
(next_cursor=None, meta=None as before).
- ServerCapabilities (#[non_exhaustive]): use the builder,
.enable_tools_with(ToolsCapability { list_changed: Some(false) }).
- Implementation / InitializeResult (#[non_exhaustive]): build via
Implementation::new(..).with_title(..).with_website_url(..) and
InitializeResult::new(caps).with_protocol_version(..).with_server_info(..)
.with_instructions(..).
- Switch deprecated type aliases CallToolRequestParam/PaginatedRequestParam
to CallToolRequestParams/PaginatedRequestParams.
Pinned to rmcp 1.7.0 in Cargo.lock. cargo check/clippy/fmt clean;
all ck-search tests pass (83 passed, 2 ignored).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 61e44fb commit 65a6e03
3 files changed
Lines changed: 145 additions & 217 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments